Skip to content

DOC: Add column name metadata to spec #17769

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

Merged
merged 2 commits into from
Oct 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/source/developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ 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>, ...],
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one to?

'column_index_dtypes': [<dtype 0>, <dtype 1>, ..., <dtype N>]
'columns': [<c0>, <c1>, ...],
'pandas_version': $VERSION}

Expand Down Expand Up @@ -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'],
Copy link
Member

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

Copy link
Member Author

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.

'columns': [
{'name': 'c0',
'pandas_type': 'int8',
Expand Down