You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ENH: Allow fixed-length strings in df.to_records()
Adds parameter to allow string-like columns to be
cast as fixed-length string-like dtypes for more
efficient storage.
Closespandas-devgh-18146.
Originally authored by @qinghao1 but cleaned up
by @gfyoung to fix merge conflicts.
* Add dtype parameters instead of fix-string-like
The original parameter was causing a lot of acrobatics
with regards to string dtypes between 2.x and 3.x.
The new parameters simplify the internal logic and
pass the responsibility and motivation of memory
efficiency back to the users.
* MAINT: Use is_dict_like in to_records
More generic than checking whether our
mappings are instances of dict.
Expands is_dict_like check to include
whether it has a __contains__ method.
* TST: Add test for is_dict_like expanded def
* MAINT: Address final comments
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.24.0.rst
+1
Original file line number
Diff line number
Diff line change
@@ -411,6 +411,7 @@ Other Enhancements
411
411
- :meth:`DataFrame.to_stata` and :class:`pandas.io.stata.StataWriter117` can write mixed sting columns to Stata strl format (:issue:`23633`)
412
412
- :meth:`DataFrame.between_time` and :meth:`DataFrame.at_time` have gained the ``axis`` parameter (:issue:`8839`)
413
413
- The ``scatter_matrix``, ``andrews_curves``, ``parallel_coordinates``, ``lag_plot``, ``autocorrelation_plot``, ``bootstrap_plot``, and ``radviz`` plots from the ``pandas.plotting`` module are now accessible from calling :meth:`DataFrame.plot` (:issue:`11978`)
414
+
- :meth:`DataFrame.to_records` now accepts ``index_dtypes`` and ``column_dtypes`` parameters to allow different data types in stored column and index records (:issue:`18146`)
414
415
- :class:`IntervalIndex` has gained the :attr:`~IntervalIndex.is_overlapping` attribute to indicate if the ``IntervalIndex`` contains any overlapping intervals (:issue:`23309`)
415
416
- :func:`pandas.DataFrame.to_sql` has gained the ``method`` argument to control SQL insertion clause. See the :ref:`insertion method <io.sql.method>` section in the documentation. (:issue:`8953`)
0 commit comments