Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range header argument could also apply to setting a pandas Series #276

Closed
sdementen opened this issue Oct 25, 2015 · 3 comments
Closed

Range header argument could also apply to setting a pandas Series #276

sdementen opened this issue Oct 25, 2015 · 3 comments
Milestone

Comments

@sdementen
Copy link
Contributor

In the doc (and the code), the index argument is used for both DataFrame and Series while the header only for DataFrame

index (boolean, default True) – Includes the index when setting a Pandas DataFrame or Series.
header (boolean, default True) – Includes the column headers when setting a Pandas DataFrame.

it could be better to also use the header argument when setting Series

@fzumstein
Copy link
Member

Were you picturing this:

In[33]: pd.Series([1.1, 3.3, 5., np.nan, 6., 8.], name='myseries')
Out[33]: 
0    1.1
1    3.3
2    5.0
3    NaN
4    6.0
5    8.0
Name: myseries, dtype: float64

to be shown in Excel as

     myseries
0    1.1
1    3.3
2    5.0
3    
4    6.0
5    8.0

in case header=True?

@sdementen
Copy link
Contributor Author

Yes but with the name of the index alose in the header

@fzumstein
Copy link
Member

Makes sense!

@fzumstein fzumstein added this to the v0.7.0 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants