-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Fail doc build on warning #22743
Changes from 24 commits
1168273
41c8297
2e76e84
a70f86d
e4a8b06
693eead
e6b2c09
a7f0b38
ff3d2dd
e544249
8bdb920
ae0f8ff
a275dfb
b190866
a46e4c7
74af53d
1668c65
dda2bfc
a2b31ab
9f0a948
158c46d
c1a5ab8
bbcd7bd
c8f206c
c917101
30c9174
5e0b275
384ace8
6a2a060
378bd6d
8859f97
b9331f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
doc-build.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2603,3 +2603,12 @@ objects. | |
generated/pandas.Series.ix | ||
generated/pandas.Series.imag | ||
generated/pandas.Series.real | ||
|
||
|
||
.. Can't convince sphinx to generate toctree for this class attribute. | ||
.. So we do it manually to avoid a warning | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
generated/pandas.api.extensions.ExtensionDtype.na_value | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No idea on this one. Something with numpydoc / sphinx autodoc. I think autodoc detects that |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -505,13 +505,11 @@ Unlike agg, apply's callable is passed a sub-DataFrame which gives you access to | |
.. ipython:: python | ||
|
||
df = pd.DataFrame({'A' : [1, 1, 2, 2], 'B' : [1, -1, 1, 2]}) | ||
|
||
gb = df.groupby('A') | ||
|
||
def replace(g): | ||
mask = g < 0 | ||
g.loc[mask] = g[~mask].mean() | ||
return g | ||
mask = g < 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently the argument passed to |
||
return g.where(mask, g[~mask].mean()) | ||
|
||
gb.transform(replace) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,16 +66,13 @@ The pandas I/O API is a set of top level ``reader`` functions accessed like | |
CSV & Text files | ||
---------------- | ||
|
||
The two workhorse functions for reading text files (a.k.a. flat files) are | ||
:func:`read_csv` and :func:`read_table`. They both use the same parsing code to | ||
intelligently convert tabular data into a ``DataFrame`` object. See the | ||
:ref:`cookbook<cookbook.csv>` for some advanced strategies. | ||
The workhorse function for reading text files (a.k.a. flat files) is | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I basically removed all references to |
||
:func:`read_csv`. See the :ref:`cookbook<cookbook.csv>` for some advanced strategies. | ||
|
||
Parsing options | ||
''''''''''''''' | ||
|
||
The functions :func:`read_csv` and :func:`read_table` accept the following | ||
common arguments: | ||
:func:`read_csv` accepts the following common arguments: | ||
|
||
Basic | ||
+++++ | ||
|
@@ -780,8 +777,8 @@ Date Handling | |
Specifying Date Columns | ||
+++++++++++++++++++++++ | ||
|
||
To better facilitate working with datetime data, :func:`read_csv` and | ||
:func:`read_table` use the keyword arguments ``parse_dates`` and ``date_parser`` | ||
To better facilitate working with datetime data, :func:`read_csv` | ||
uses the keyword arguments ``parse_dates`` and ``date_parser`` | ||
to allow users to specify a variety of columns and date/time formats to turn the | ||
input text data into ``datetime`` objects. | ||
|
||
|
@@ -1434,7 +1431,7 @@ Suppose you have data indexed by two columns: | |
|
||
print(open('data/mindex_ex.csv').read()) | ||
|
||
The ``index_col`` argument to ``read_csv`` and ``read_table`` can take a list of | ||
The ``index_col`` argument to ``read_csv`` can take a list of | ||
column numbers to turn multiple columns into a ``MultiIndex`` for the index of the | ||
returned object: | ||
|
||
|
@@ -1505,8 +1502,8 @@ class of the csv module. For this, you have to specify ``sep=None``. | |
|
||
.. ipython:: python | ||
|
||
print(open('tmp2.sv').read()) | ||
pd.read_csv('tmp2.sv', sep=None, engine='python') | ||
print(open('tmp2.sv').read()) | ||
pd.read_csv('tmp2.sv', sep=None, engine='python') | ||
|
||
.. _io.multiple_files: | ||
|
||
|
@@ -1528,16 +1525,16 @@ rather than reading the entire file into memory, such as the following: | |
.. ipython:: python | ||
|
||
print(open('tmp.sv').read()) | ||
table = pd.read_table('tmp.sv', sep='|') | ||
table = pd.read_csv('tmp.sv', sep='|') | ||
table | ||
|
||
|
||
By specifying a ``chunksize`` to ``read_csv`` or ``read_table``, the return | ||
By specifying a ``chunksize`` to ``read_csv``, the return | ||
value will be an iterable object of type ``TextFileReader``: | ||
|
||
.. ipython:: python | ||
|
||
reader = pd.read_table('tmp.sv', sep='|', chunksize=4) | ||
reader = pd.read_csv('tmp.sv', sep='|', chunksize=4) | ||
reader | ||
|
||
for chunk in reader: | ||
|
@@ -1548,7 +1545,7 @@ Specifying ``iterator=True`` will also return the ``TextFileReader`` object: | |
|
||
.. ipython:: python | ||
|
||
reader = pd.read_table('tmp.sv', sep='|', iterator=True) | ||
reader = pd.read_csv('tmp.sv', sep='|', iterator=True) | ||
reader.get_chunk(5) | ||
|
||
.. ipython:: python | ||
|
@@ -3067,7 +3064,7 @@ Clipboard | |
|
||
A handy way to grab data is to use the :meth:`~DataFrame.read_clipboard` method, | ||
which takes the contents of the clipboard buffer and passes them to the | ||
``read_table`` method. For instance, you can copy the following text to the | ||
``read_csv`` method. For instance, you can copy the following text to the | ||
clipboard (CTRL-C on many operating systems): | ||
|
||
.. code-block:: python | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -312,14 +312,15 @@ All one-dimensional list-likes can be combined in a list-like container (includi | |
|
||
s | ||
u | ||
s.str.cat([u.values, ['A', 'B', 'C', 'D'], map(str, u.index)], na_rep='-') | ||
s.str.cat([u.values, | ||
u.index.astype(str).values], na_rep='-') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @h-vetinari the list inside a list was causing issues. I've removed it from the examples. It'd be good to write new ones demonstrating that though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this was an oversight in #22264 where we deprecated lists within lists.
New examples? |
||
|
||
All elements must match in length to the calling ``Series`` (or ``Index``), except those having an index if ``join`` is not None: | ||
|
||
.. ipython:: python | ||
|
||
v | ||
s.str.cat([u, v, ['A', 'B', 'C', 'D']], join='outer', na_rep='-') | ||
s.str.cat([u, v], join='outer', na_rep='-') | ||
|
||
If using ``join='right'`` on a list of ``others`` that contains different indexes, | ||
the union of these indexes will be used as the basis for the final concatenation: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @datapythonista single-page
pandas.io.formats.style.Styler
wasn't working earlier, since it's not available from the top-level namespace. Do we have tests for this?