@@ -45,20 +45,19 @@ So that a ``pandas.DataFrame`` can be faithfully reconstructed, we store a
45
45
.. code-block :: text
46
46
47
47
{'index_columns': ['__index_level_0__', '__index_level_1__', ...],
48
- 'column_index_names': [<column index level name 0>, <column index level name 1>, ...],
49
- 'column_index_dtypes': [<dtype 0>, <dtype 1>, ..., <dtype N>]
48
+ 'column_indexes': [<ci0>, <ci1>, ..., <ciN>],
50
49
'columns': [<c0>, <c1>, ...],
51
50
'pandas_version': $VERSION}
52
51
53
- Here, ``<c0> `` and so forth are dictionaries containing the metadata for each
54
- column. This has JSON form:
52
+ Here, ``<c0> ``/`` <ci0> `` and so forth are dictionaries containing the metadata
53
+ for each column. This has JSON form:
55
54
56
55
.. code-block :: text
57
56
58
57
{'name': column_name,
59
58
'pandas_type': pandas_type,
60
59
'numpy_type': numpy_type,
61
- 'metadata': type_metadata }
60
+ 'metadata': metadata }
62
61
63
62
``pandas_type `` is the logical type of the column, and is one of:
64
63
@@ -75,7 +74,7 @@ result of ``str(dtype)`` for the underlying NumPy array that holds the data. So
75
74
for ``datetimetz `` this is ``datetime64[ns] `` and for categorical, it may be
76
75
any of the supported integer categorical types.
77
76
78
- The ``type_metadata `` is ``None `` except for:
77
+ The ``metadata `` field is ``None `` except for:
79
78
80
79
* ``datetimetz ``: ``{'timezone': zone, 'unit': 'ns'} ``, e.g. ``{'timezone',
81
80
'America/New_York', 'unit': 'ns'} ``. The ``'unit' `` is optional, and if
@@ -108,8 +107,12 @@ As an example of fully-formed metadata:
108
107
.. code-block :: text
109
108
110
109
{'index_columns': ['__index_level_0__'],
111
- 'column_index_names': [None],
112
- 'column_index_dtypes': ['object'],
110
+ 'column_indexes': [
111
+ {'name': None,
112
+ 'pandas_type': 'string',
113
+ 'numpy_type': 'object',
114
+ 'metadata': None}
115
+ ],
113
116
'columns': [
114
117
{'name': 'c0',
115
118
'pandas_type': 'int8',
0 commit comments