Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 0 additions & 2 deletions .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
run: python web/pandas_web.py web/pandas --target-path=web/build

- name: Build documentation
# TEMP don't let errors fail the build until all string dtype changes are fixed
continue-on-error: true
run: doc/make.py --warnings-are-errors

- name: Build the interactive terminal
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
branches:
- main
- 2.3.x
pull_request:
branches:
- main
- 2.3.x
paths-ignore:
- "doc/**"
- "web/**"
# pull_request:
# branches:
# - main
# - 2.3.x
# paths-ignore:
# - "doc/**"
# - "web/**"

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ arguments. The special value ``all`` can also be used:

.. ipython:: python

frame.describe(include=["object"])
frame.describe(include=["str"])
frame.describe(include=["number"])
frame.describe(include="all")

Expand Down
16 changes: 8 additions & 8 deletions doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5281,13 +5281,13 @@ Write to a parquet file.
.. ipython:: python

df.to_parquet("example_pa.parquet", engine="pyarrow")
df.to_parquet("example_fp.parquet", engine="fastparquet")
# df.to_parquet("example_fp.parquet", engine="fastparquet")

Read from a parquet file.

.. ipython:: python

result = pd.read_parquet("example_fp.parquet", engine="fastparquet")
# result = pd.read_parquet("example_fp.parquet", engine="fastparquet")
result = pd.read_parquet("example_pa.parquet", engine="pyarrow")

result.dtypes
Expand All @@ -5309,11 +5309,11 @@ Read only certain columns of a parquet file.

.. ipython:: python

result = pd.read_parquet(
"example_fp.parquet",
engine="fastparquet",
columns=["a", "b"],
)
# result = pd.read_parquet(
# "example_fp.parquet",
# engine="fastparquet",
# columns=["a", "b"],
# )
result = pd.read_parquet(
"example_pa.parquet",
engine="pyarrow",
Expand All @@ -5326,7 +5326,7 @@ Read only certain columns of a parquet file.
:suppress:

os.remove("example_pa.parquet")
os.remove("example_fp.parquet")
# os.remove("example_fp.parquet")


Handling indexes
Expand Down
4 changes: 2 additions & 2 deletions doc/source/whatsnew/v0.13.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ API changes
.. ipython:: python
:okwarning:

dfc.loc[0]['A'] = 1111
dfc.loc[0]['B'] = 1111
Copy link
Member Author

Choose a reason for hiding this comment

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

The B column are already integers, so this example of chained assignment is still valid this way, but then doesn't include dtype changes


::

Expand All @@ -198,7 +198,7 @@ API changes

.. ipython:: python

dfc.loc[0, 'A'] = 11
dfc.loc[0, 'B'] = 1111
dfc

- ``Panel.reindex`` has the following call signature ``Panel.reindex(items=None, major_axis=None, minor_axis=None, **kwargs)``
Expand Down
47 changes: 38 additions & 9 deletions doc/source/whatsnew/v0.15.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1025,20 +1025,49 @@ Other:
- :func:`describe` on mixed-types DataFrames is more flexible. Type-based column filtering is now possible via the ``include``/``exclude`` arguments.
See the :ref:`docs <basics.describe>` (:issue:`8164`).

.. ipython:: python
.. code-block:: python

df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
'catB': ['a', 'b', 'c', 'd'] * 6,
'numC': np.arange(24),
'numD': np.arange(24.) + .5})
df.describe(include=["object"])
df.describe(include=["number", "object"], exclude=["float"])
>>> df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
... 'catB': ['a', 'b', 'c', 'd'] * 6,
... 'numC': np.arange(24),
... 'numD': np.arange(24.) + .5})
>>> df.describe(include=["object"])
catA catB
count 24 24
unique 2 4
top foo a
freq 16 6
>>> df.describe(include=["number", "object"], exclude=["float"])
catA catB numC
count 24 24 24.000000
unique 2 4 NaN
top foo a NaN
freq 16 6 NaN
mean NaN NaN 11.500000
std NaN NaN 7.071068
min NaN NaN 0.000000
25% NaN NaN 5.750000
50% NaN NaN 11.500000
75% NaN NaN 17.250000
max NaN NaN 23.000000

Requesting all columns is possible with the shorthand 'all'

.. ipython:: python
.. code-block:: python

df.describe(include='all')
>>> df.describe(include='all')
catA catB numC numD
count 24 24 24.000000 24.000000
unique 2 4 NaN NaN
top foo a NaN NaN
freq 16 6 NaN NaN
mean NaN NaN 11.500000 12.000000
std NaN NaN 7.071068 7.071068
min NaN NaN 0.000000 0.500000
25% NaN NaN 5.750000 6.250000
50% NaN NaN 11.500000 12.000000
75% NaN NaN 17.250000 17.750000
max NaN NaN 23.000000 23.500000

Without those arguments, ``describe`` will behave as before, including only numerical columns or, if none are, only categorical columns. See also the :ref:`docs <basics.describe>`

Expand Down