Skip to content

implement ability to change the default name of last column in to_csv/excel when wide=False #549

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

Closed
alixdamman opened this issue Dec 1, 2017 · 4 comments

Comments

@alixdamman
Copy link
Collaborator

@gdementen

The flag transpose in to_csv is nice but creates an extra axis with a default name (an integer).
Btw, users may want to change that meaningless default name.
So when you try to read the CSV file after, you get an LArray object with shape like
'axis1 (10) x axis2 (16) x axis3 (8) x default (1)' and then you need to reshape the array to get rid of this last axis.

Do you think it worth to do something about it?

@gdementen
Copy link
Contributor

+1 for an ability to change that name (and have some something more sensible as default, like "value")
+1 for being able to read that back nicely, though I don't know how to improve on the current situation. Please provide mockup syntaxes and (tiny) output examples.
Btw: In this situation, I have so far told our users to use ['label_of_default_axis'] to get rid of it. It is simpler than reshape.

@alixdamman alixdamman added this to the 0.28 milestone Dec 1, 2017
@alixdamman alixdamman self-assigned this Dec 1, 2017
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 5, 2018
* added argument 'data_col_name' to to_csv to set the name of the last column (i.e. the one containing the data) when exporting to csv with transpose=False
@alixdamman alixdamman changed the title add argument to read_csv which "undo" what 'transpose' does in to_csv implement ability to change the default name of last column in to_csv when transpose=False Feb 5, 2018
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 5, 2018
…set the name of the last column (i.e. the one containing the data) when exporting to csv with transpose=False
@alixdamman alixdamman changed the title implement ability to change the default name of last column in to_csv when transpose=False implement ability to change the default name of last column in to_csv/excel when transpose=False Feb 5, 2018
@alixdamman
Copy link
Collaborator Author

@gdementen rename argument transpose as vertical or data_to_column?

alixdamman added a commit to alixdamman/larray that referenced this issue Feb 5, 2018
…el to set the name of the last column (i.e. the one containing the data) when exporting to csv/excel with vertical=True

* renamed argument 'transpose' of to_csv/excel as 'vertical'
@gdementen
Copy link
Contributor

I have never heard it called "vertical".

  • Wikipedia speaks about wide and narrow (sometimes un-stacked and stacked, or wide and tall)
  • Pandas uses wide and long

From a quick google search, the most common of the terms above seems to be "wide". So use wide=True instead?

@alixdamman
Copy link
Collaborator Author

OK for wide. We need to add some explanation/examples in the tutorial ;)

@alixdamman alixdamman changed the title implement ability to change the default name of last column in to_csv/excel when transpose=False implement ability to change the default name of last column in to_csv/excel when wide=False Feb 6, 2018
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 6, 2018
…to set the name of the last column (i.e. the one containing the values) when exporting to csv/excel with wide=False

* renamed argument 'transpose' of to_csv/excel as 'vertical'
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 6, 2018
…to set the name of the last column (i.e. the one containing the values) when exporting to csv/excel with wide=False

* renamed argument 'transpose' of to_csv/excel as 'vertical'
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 6, 2018
…to set the name of the last column (i.e. the one containing the values) when exporting to csv/excel with wide=False

* renamed argument 'transpose' of to_csv/excel as 'vertical'
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 16, 2018
…to set the name of the last column (i.e. the one containing the values) when exporting to csv/excel with wide=False

* renamed argument 'transpose' of to_csv/excel as 'vertical'
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 16, 2018
…to set the name of the last column (i.e. the one containing the values) when exporting to csv/excel with wide=False

* renamed argument 'transpose' of to_csv/excel as 'vertical'
alixdamman added a commit to alixdamman/larray that referenced this issue Feb 16, 2018
…to set the name of the last column (i.e. the one containing the values) when exporting to csv/excel with wide=False
gdementen pushed a commit that referenced this issue Aug 31, 2018
…e of the last column (i.e. the one containing the values) when exporting to csv/excel with wide=False
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