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

Comments

Projects
None yet
2 participants
@sdementen
Contributor

sdementen commented Oct 25, 2015

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

This comment has been minimized.

Member

fzumstein commented Feb 4, 2016

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

This comment has been minimized.

Contributor

sdementen commented Feb 4, 2016

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

@fzumstein

This comment has been minimized.

Member

fzumstein commented Feb 5, 2016

Makes sense!

@fzumstein fzumstein added this to the v0.7.0 milestone Feb 5, 2016

@fzumstein fzumstein closed this in f4cdf92 Mar 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment