File tree 4 files changed +351
-253
lines changed
4 files changed +351
-253
lines changed Original file line number Diff line number Diff line change @@ -6033,6 +6033,14 @@ values will have ``object`` data type.
6033
6033
``int64 `` for all integer types and ``float64 `` for floating point data. By default,
6034
6034
the Stata data types are preserved when importing.
6035
6035
6036
+ .. note ::
6037
+
6038
+ All :class: `~pandas.io.stata.StataReader ` objects, whether created by :func: `~pandas.read_stata `
6039
+ (when using ``iterator=True `` or ``chunksize ``) or instantiated by hand, must be used as context
6040
+ managers (e.g. the ``with `` statement).
6041
+ While the :meth: `~pandas.io.stata.StataReader.close ` method is available, its use is unsupported.
6042
+ It is not part of the public API and will be removed in with future without warning.
6043
+
6036
6044
.. ipython :: python
6037
6045
:suppress:
6038
6046
Original file line number Diff line number Diff line change @@ -857,6 +857,7 @@ Deprecations
857
857
- Deprecated :meth: `Series.backfill ` in favor of :meth: `Series.bfill ` (:issue: `33396 `)
858
858
- Deprecated :meth: `DataFrame.pad ` in favor of :meth: `DataFrame.ffill ` (:issue: `33396 `)
859
859
- Deprecated :meth: `DataFrame.backfill ` in favor of :meth: `DataFrame.bfill ` (:issue: `33396 `)
860
+ - Deprecated :meth: `~pandas.io.stata.StataReader.close `. Use :class: `~pandas.io.stata.StataReader ` as a context manager instead (:issue: `49228 `)
860
861
861
862
.. ---------------------------------------------------------------------------
862
863
.. _whatsnew_200.prior_deprecations :
@@ -1163,6 +1164,8 @@ Performance improvements
1163
1164
- Fixed a reference leak in :func: `read_hdf ` (:issue: `37441 `)
1164
1165
- Fixed a memory leak in :meth: `DataFrame.to_json ` and :meth: `Series.to_json ` when serializing datetimes and timedeltas (:issue: `40443 `)
1165
1166
- Decreased memory usage in many :class: `DataFrameGroupBy ` methods (:issue: `51090 `)
1167
+ - Memory improvement in :class: `StataReader ` when reading seekable files (:issue: `48922 `)
1168
+
1166
1169
1167
1170
.. ---------------------------------------------------------------------------
1168
1171
.. _whatsnew_200.bug_fixes :
You can’t perform that action at this time.
0 commit comments