-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Cleaned references to pandas <v0.12 in docs #17375
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
Changes from 2 commits
d566383
6abd5cc
5bc8714
7b9bc62
7d18e06
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 |
---|---|---|
|
@@ -364,7 +364,7 @@ warn_bad_lines : boolean, default ``True`` | |
Specifying column data types | ||
'''''''''''''''''''''''''''' | ||
|
||
Starting with v0.10, you can indicate the data type for the whole DataFrame or | ||
You can indicate the data type for the whole DataFrame or | ||
individual columns: | ||
|
||
.. ipython:: python | ||
|
@@ -3346,7 +3346,7 @@ Read/Write API | |
'''''''''''''' | ||
|
||
``HDFStore`` supports an top-level API using ``read_hdf`` for reading and ``to_hdf`` for writing, | ||
similar to how ``read_csv`` and ``to_csv`` work. (new in 0.11.0) | ||
similar to how ``read_csv`` and ``to_csv`` work. | ||
|
||
.. ipython:: python | ||
|
||
|
@@ -3791,7 +3791,7 @@ indexed dimension as the ``where``. | |
|
||
.. note:: | ||
|
||
Indexes are automagically created (starting ``0.10.1``) on the indexables | ||
Indexes are automagically created on the indexables | ||
and any data columns you specify. This behavior can be turned off by passing | ||
``index=False`` to ``append``. | ||
|
||
|
@@ -3878,7 +3878,7 @@ create a new table!) | |
Iterator | ||
++++++++ | ||
|
||
Starting in ``0.11.0``, you can pass, ``iterator=True`` or ``chunksize=number_in_a_chunk`` | ||
You can pass ``iterator=True`` or ``chunksize=number_in_a_chunk`` | ||
to ``select`` and ``select_as_multiple`` to return an iterator on the results. | ||
The default is 50,000 rows returned in a chunk. | ||
|
||
|
@@ -3986,8 +3986,8 @@ of rows in an object. | |
Multiple Table Queries | ||
++++++++++++++++++++++ | ||
|
||
New in 0.10.1 are the methods ``append_to_multiple`` and | ||
``select_as_multiple``, that can perform appending/selecting from | ||
The methods ``append_to_multiple`` and | ||
``select_as_multiple`` can perform appending/selecting from | ||
multiple tables at once. The idea is to have one table (call it the | ||
selector table) that you index most/all of the columns, and perform your | ||
queries. The other table(s) are data tables with an index matching the | ||
|
@@ -4291,7 +4291,7 @@ Pass ``min_itemsize`` on the first table creation to a-priori specify the minimu | |
``min_itemsize`` can be an integer, or a dict mapping a column name to an integer. You can pass ``values`` as a key to | ||
allow all *indexables* or *data_columns* to have this min_itemsize. | ||
|
||
Starting in 0.11.0, passing a ``min_itemsize`` dict will cause all passed columns to be created as *data_columns* automatically. | ||
Passing a ``min_itemsize`` dict will cause all passed columns to be created as *data_columns* automatically. | ||
|
||
.. note:: | ||
|
||
|
@@ -4419,44 +4419,6 @@ Now you can import the ``DataFrame`` into R: | |
starting point if you have stored multiple ``DataFrame`` objects to a | ||
single HDF5 file. | ||
|
||
Backwards Compatibility | ||
''''''''''''''''''''''' | ||
|
||
0.10.1 of ``HDFStore`` can read tables created in a prior version of pandas, | ||
however query terms using the | ||
prior (undocumented) methodology are unsupported. ``HDFStore`` will | ||
issue a warning if you try to use a legacy-format file. You must | ||
read in the entire file and write it out using the new format, using the | ||
method ``copy`` to take advantage of the updates. The group attribute | ||
``pandas_version`` contains the version information. ``copy`` takes a | ||
number of options, please see the docstring. | ||
|
||
|
||
.. ipython:: python | ||
:suppress: | ||
|
||
import os | ||
legacy_file_path = os.path.abspath('source/_static/legacy_0.10.h5') | ||
|
||
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. actually you can also remove the legacy stuff from the tests as well (and add a small note in the whatsnew) 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. Ok. Is it correct we're talking about the 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. Can we leave test changes for a separate PR please? 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've made a start to it (#17398), but I have some issuse. One issue is that this doc fragment uses a binary hdf file that needs to be deleted. Can this request be accepted now, so the other will pass? I will do it today and/or tomorrow. 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. you can remove this part of the doc in the other PR |
||
.. ipython:: python | ||
:okwarning: | ||
|
||
# a legacy store | ||
legacy_store = pd.HDFStore(legacy_file_path,'r') | ||
legacy_store | ||
|
||
# copy (and return the new handle) | ||
new_store = legacy_store.copy('store_new.h5') | ||
new_store | ||
new_store.close() | ||
|
||
.. ipython:: python | ||
:suppress: | ||
|
||
legacy_store.close() | ||
import os | ||
os.remove('store_new.h5') | ||
|
||
|
||
Performance | ||
''''''''''' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,9 +67,8 @@ arise and we wish to also consider that "missing" or "not available" or "NA". | |
|
||
.. note:: | ||
|
||
Prior to version v0.10.0 ``inf`` and ``-inf`` were also | ||
considered to be "NA" in computations. This is no longer the case by | ||
default; use the ``mode.use_inf_as_na`` option to recover it. | ||
If you want to consider ``inf`` and ``-inf`` | ||
to be "NA" in computations, you can use the ``mode.use_inf_as_na`` option to archieve it. | ||
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. achieve |
||
|
||
.. _missing.isna: | ||
|
||
|
@@ -485,8 +484,8 @@ respectively: | |
|
||
Replacing Generic Values | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Often times we want to replace arbitrary values with other values. New in v0.8 | ||
is the ``replace`` method in Series/DataFrame that provides an efficient yet | ||
Often times we want to replace arbitrary values with other values. The | ||
``replace`` method in Series/DataFrame provides an efficient yet | ||
flexible way to perform such replacements. | ||
|
||
For a Series, you can replace a single value or a list of values by another | ||
|
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.
can you add a referencde to the section where panel is deprecated.
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.
There is a deprecation warning a bit above, so it's too much adding it here also IMO. I changed a note that calls on people to contribute to panels, though, as that isnt relevant anymore.