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
:ref:`Duplicate column names <io.dupe_names>` are now supported in :func:`read_csv` whether
199
199
they are in the file or passed in as the ``names`` parameter (:issue:`7160`, :issue:`9424`)
@@ -307,48 +307,6 @@ Google BigQuery Enhancements
307
307
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
308
308
- The :func:`pandas.io.gbq.read_gbq` method has gained the ``dialect`` argument to allow users to specify whether to use BigQuery's legacy SQL or BigQuery's standard SQL. See the :ref:`docs <io.bigquery_reader>` for more details (:issue:`13615`).
309
309
310
-
.. _whatsnew_0190.sparse:
311
-
312
-
Sparse changes
313
-
~~~~~~~~~~~~~~
314
-
315
-
These changes allow pandas to handle sparse data with more dtypes, and for work to make a smoother experience with data handling.
316
-
317
-
- Sparse data structure now can preserve ``dtype`` after arithmetic ops (:issue:`13848`)
318
-
319
-
.. ipython:: python
320
-
321
-
s = pd.SparseSeries([0, 2, 0, 1], fill_value=0, dtype=np.int64)
322
-
s.dtype
323
-
324
-
s + 1
325
-
326
-
- Sparse data structure now support ``astype`` to convert internal ``dtype`` (:issue:`13900`)
327
-
328
-
.. ipython:: python
329
-
330
-
s = pd.SparseSeries([1., 0., 2., 0.], fill_value=0)
331
-
s
332
-
s.astype(np.int64)
333
-
334
-
``astype`` fails if data contains values which cannot be converted to specified ``dtype``.
335
-
Note that the limitation is applied to ``fill_value`` which default is ``np.nan``.
336
-
337
-
.. code-block:: ipython
338
-
339
-
In [7]: pd.SparseSeries([1., np.nan, 2., np.nan], fill_value=np.nan).astype(np.int64)
340
-
Out[7]:
341
-
ValueError: unable to coerce current fill_value nan to int64 dtype
342
-
343
-
- Subclassed ``SparseDataFrame`` and ``SparseSeries`` now preserve class types when slicing or transposing. (:issue:`13787`)
344
-
- Bug in ``SparseSeries`` with ``MultiIndex`` ``[]`` indexing may raise ``IndexError`` (:issue:`13144`)
345
-
- Bug in ``SparseSeries`` with ``MultiIndex`` ``[]`` indexing result may have normal ``Index`` (:issue:`13144`)
346
-
- Bug in ``SparseDataFrame`` in which ``axis=None`` did not default to ``axis=0`` (:issue:`13048`)
347
-
- Bug in ``SparseSeries`` and ``SparseDataFrame`` creation with ``object`` dtype may raise ``TypeError`` (:issue:`11633`)
348
-
- Bug in ``SparseDataFrame`` doesn't respect passed ``SparseArray`` or ``SparseSeries`` 's dtype and ``fill_value`` (:issue:`13866`)
349
-
- Bug in ``SparseArray`` and ``SparseSeries`` don't apply ufunc to ``fill_value`` (:issue:`13853`)
350
-
- Bug in ``SparseSeries.abs`` incorrectly keeps negative ``fill_value`` (:issue:`13853`)
These changes allow pandas to handle sparse data with more dtypes, and for work to make a smoother experience with data handling.
683
+
684
+
- Sparse data structure now can preserve ``dtype`` after arithmetic ops (:issue:`13848`)
685
+
686
+
.. ipython:: python
687
+
688
+
s = pd.SparseSeries([0, 2, 0, 1], fill_value=0, dtype=np.int64)
689
+
s.dtype
690
+
691
+
s + 1
692
+
693
+
- Sparse data structure now support ``astype`` to convert internal ``dtype`` (:issue:`13900`)
694
+
695
+
.. ipython:: python
696
+
697
+
s = pd.SparseSeries([1., 0., 2., 0.], fill_value=0)
698
+
s
699
+
s.astype(np.int64)
700
+
701
+
``astype`` fails if data contains values which cannot be converted to specified ``dtype``.
702
+
Note that the limitation is applied to ``fill_value`` which default is ``np.nan``.
703
+
704
+
.. code-block:: ipython
705
+
706
+
In [7]: pd.SparseSeries([1., np.nan, 2., np.nan], fill_value=np.nan).astype(np.int64)
707
+
Out[7]:
708
+
ValueError: unable to coerce current fill_value nan to int64 dtype
709
+
710
+
- Subclassed ``SparseDataFrame`` and ``SparseSeries`` now preserve class types when slicing or transposing. (:issue:`13787`)
711
+
- Bug in ``SparseSeries`` with ``MultiIndex`` ``[]`` indexing may raise ``IndexError`` (:issue:`13144`)
712
+
- Bug in ``SparseSeries`` with ``MultiIndex`` ``[]`` indexing result may have normal ``Index`` (:issue:`13144`)
713
+
- Bug in ``SparseDataFrame`` in which ``axis=None`` did not default to ``axis=0`` (:issue:`13048`)
714
+
- Bug in ``SparseSeries`` and ``SparseDataFrame`` creation with ``object`` dtype may raise ``TypeError`` (:issue:`11633`)
715
+
- Bug in ``SparseDataFrame`` doesn't respect passed ``SparseArray`` or ``SparseSeries`` 's dtype and ``fill_value`` (:issue:`13866`)
716
+
- Bug in ``SparseArray`` and ``SparseSeries`` don't apply ufunc to ``fill_value`` (:issue:`13853`)
717
+
- Bug in ``SparseSeries.abs`` incorrectly keeps negative ``fill_value`` (:issue:`13853`)
718
+
719
719
.. _whatsnew_0190.deprecations:
720
720
721
721
Deprecations
722
-
^^^^^^^^^^^^
722
+
~~~~~~~~~~~~
723
723
- ``Categorical.reshape`` has been deprecated and will be removed in a subsequent release (:issue:`12882`)
724
724
- ``Series.reshape`` has been deprecated and will be removed in a subsequent release (:issue:`12882`)
725
725
@@ -738,7 +738,7 @@ Deprecations
738
738
.. _whatsnew_0190.prior_deprecations:
739
739
740
740
Removal of prior version deprecations/changes
741
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
741
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
742
742
- The ``SparsePanel`` class has been removed (:issue:`13778`)
743
743
- The ``pd.sandbox`` module has been removed in favor of the external library ``pandas-qt`` (:issue:`13670`)
744
744
- The ``pandas.io.data`` and ``pandas.io.wb`` modules are removed in favor of
@@ -797,6 +797,7 @@ Bug Fixes
797
797
798
798
- Bug in ``groupby().shift()``, which could cause a segfault or corruption in rare circumstances when grouping by columns with missing values (:issue:`13813`)
799
799
- Bug in ``pd.read_csv()``, which may cause a segfault or corruption when iterating in large chunks over a stream/file under rare circumstances (:issue:`13703`)
800
+
- Bug in ``pd.read_csv()``, which caused BOM files to be incorrectly parsed by not ignoring the BOM (:issue:`4793`)
800
801
- Bug in ``io.json.json_normalize()``, where non-ascii keys raised an exception (:issue:`13213`)
801
802
- Bug when passing a not-default-indexed ``Series`` as ``xerr`` or ``yerr`` in ``.plot()`` (:issue:`11858`)
802
803
- Bug in matplotlib ``AutoDataFormatter``; this restores the second scaled formatting and re-adds micro-second scaled formatting (:issue:`13131`)
0 commit comments