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

mixed types in columns? #15

Closed
matt-long opened this issue Feb 4, 2019 · 3 comments · Fixed by #119
Closed

mixed types in columns? #15

matt-long opened this issue Feb 4, 2019 · 3 comments · Fixed by #119
Labels
enhancement Issues that are found to be a reasonable candidate feature additions

Comments

@matt-long
Copy link
Contributor

Should we be setting a default type in DataFrame columns?

@andersy005
Copy link
Member

@matt-long, is this still an issue?

@andersy005
Copy link
Member

andersy005 commented May 9, 2019

@matt-long,

While working on #66, I realized that this issue causes a lot of other issues when it comes to the .search() method (when the default value for a column is not compatible with the column data type). For example, if the column is supposed to contain integers, and None is used as a sentinel value, the column data type is cast to float. Assuming that this column is meant to contain years, a value of 2000 becomes 2000.0. As a result, the search() method becomes unreliable.

Should we be setting a default type in DataFrame columns?

This sounds like a step in the right direction though It may not be an easy task as the number of collections supported in intake-esm increases.

  • Can we replace .csv with a different file format such as parquet or hdf5 that maintains the original column data types instead of infering them at runtime?
  • One disadvantage of these formats is that they are not human-readable. Would this be a problem to the users?

@matt-long
Copy link
Contributor Author

I don't see a problem with non-human-readable formats.

@andersy005 andersy005 added enhancement Issues that are found to be a reasonable candidate feature additions and removed question labels Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that are found to be a reasonable candidate feature additions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants