-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
DOC: Add column name metadata to spec #17769
Conversation
@@ -45,6 +45,7 @@ So that a ``pandas.DataFrame`` can be faithfully reconstructed, we store a | |||
.. code-block:: text | |||
|
|||
{'index_columns': ['__index_level_0__', '__index_level_1__', ...], | |||
'column_index_names': [<column index level name 0>, <column index level name 1>, ...], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also store: columns_index_dtypes
to faithfully restore the dtypes as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one to?
Codecov Report
@@ Coverage Diff @@
## master #17769 +/- ##
==========================================
- Coverage 91.26% 91.24% -0.02%
==========================================
Files 163 163
Lines 49869 49869
==========================================
- Hits 45511 45502 -9
- Misses 4358 4367 +9
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #17769 +/- ##
==========================================
- Coverage 91.26% 91.22% -0.04%
==========================================
Files 163 163
Lines 49869 49916 +47
==========================================
+ Hits 45511 45535 +24
- Misses 4358 4381 +23
Continue to review full report at Codecov.
|
thanks @cpcloud |
@@ -106,6 +108,8 @@ As an example of fully-formed metadata: | |||
.. code-block:: text | |||
|
|||
{'index_columns': ['__index_level_0__'], | |||
'column_index_names': [None], | |||
'column_index_dtypes': ['object'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to enrich these types to include both the pandas type and the numpy type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'm going to follow up here.
This adds an additional metadata field to the spec to allow faithful
reproduction of names of column indexes.
cc @wesm @martindurant @jreback