Skip to content

Commit aa361e5

Browse files
committed
DOC: make sure foo.csv is properly created in io.rst
DOC: remove some experimental tags
1 parent 97fd744 commit aa361e5

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

doc/source/io.rst

+23-10
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ object.
3737
* :ref:`read_feather<io.feather>`
3838
* :ref:`read_sql<io.sql>`
3939
* :ref:`read_json<io.json_reader>`
40-
* :ref:`read_msgpack<io.msgpack>` (experimental)
40+
* :ref:`read_msgpack<io.msgpack>`
4141
* :ref:`read_html<io.read_html>`
42-
* :ref:`read_gbq<io.bigquery_reader>` (experimental)
42+
* :ref:`read_gbq<io.bigquery_reader>`
4343
* :ref:`read_stata<io.stata_reader>`
4444
* :ref:`read_sas<io.sas_reader>`
4545
* :ref:`read_clipboard<io.clipboard>`
@@ -53,9 +53,9 @@ The corresponding ``writer`` functions are object methods that are accessed like
5353
* :ref:`to_feather<io.feather>`
5454
* :ref:`to_sql<io.sql>`
5555
* :ref:`to_json<io.json_writer>`
56-
* :ref:`to_msgpack<io.msgpack>` (experimental)
56+
* :ref:`to_msgpack<io.msgpack>`
5757
* :ref:`to_html<io.html>`
58-
* :ref:`to_gbq<io.bigquery_writer>` (experimental)
58+
* :ref:`to_gbq<io.bigquery_writer>`
5959
* :ref:`to_stata<io.stata_writer>`
6060
* :ref:`to_clipboard<io.clipboard>`
6161
* :ref:`to_pickle<io.pickle>`
@@ -428,8 +428,8 @@ worth trying.
428428
:okwarning:
429429
430430
df = pd.DataFrame({'col_1': list(range(500000)) + ['a', 'b'] + list(range(500000))})
431-
df.to_csv('foo')
432-
mixed_df = pd.read_csv('foo')
431+
df.to_csv('foo.csv')
432+
mixed_df = pd.read_csv('foo.csv')
433433
mixed_df['col_1'].apply(type).value_counts()
434434
mixed_df['col_1'].dtype
435435
@@ -438,6 +438,11 @@ worth trying.
438438
data that was read in. It is important to note that the overall column will be
439439
marked with a ``dtype`` of ``object``, which is used for columns with mixed dtypes.
440440

441+
.. ipython:: python
442+
:suppress:
443+
444+
os.remove('foo.csv')
445+
441446
.. _io.categorical:
442447

443448
Specifying Categorical dtype
@@ -570,6 +575,7 @@ The ``usecols`` argument can also be used to specify which columns not to
570575
use in the final result:
571576

572577
.. ipython:: python
578+
573579
pd.read_csv(StringIO(data), usecols=lambda x: x not in ['a', 'c'])
574580
575581
In this case, the callable is specifying that we exclude the "a" and "c"
@@ -730,6 +736,13 @@ input text data into ``datetime`` objects.
730736

731737
The simplest case is to just pass in ``parse_dates=True``:
732738

739+
.. ipython:: python
740+
:suppress:
741+
742+
f = open('foo.csv','w')
743+
f.write('date,A,B,C\n20090101,a,1,2\n20090102,b,3,4\n20090103,c,4,5')
744+
f.close()
745+
733746
.. ipython:: python
734747
735748
# Use a column as an index, and parse it as dates.
@@ -2826,8 +2839,8 @@ any pickled pandas object (or any other pickled object) from file:
28262839

28272840
.. _io.msgpack:
28282841

2829-
msgpack (experimental)
2830-
----------------------
2842+
msgpack
2843+
-------
28312844

28322845
.. versionadded:: 0.13.0
28332846

@@ -4547,8 +4560,8 @@ And then issue the following queries:
45474560
45484561
.. _io.bigquery:
45494562

4550-
Google BigQuery (Experimental)
4551-
------------------------------
4563+
Google BigQuery
4564+
---------------
45524565

45534566
.. versionadded:: 0.13.0
45544567

pandas/io/json.py

+1
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ def json_normalize(data, record_path=None, meta=None,
745745
path to records is ['foo', 'bar']
746746
meta_prefix : string, default None
747747
errors : {'raise', 'ignore'}, default 'raise'
748+
748749
* ignore : will ignore KeyError if keys listed in meta are not
749750
always present
750751
* raise : will raise KeyError if keys listed in meta are not

0 commit comments

Comments
 (0)