Skip to content

Commit baee6b2

Browse files
committedNov 10, 2018
Merge remote-tracking branch 'upstream/master' into ea-repr
2 parents 5d8d2fc + 383d052 commit baee6b2

File tree

235 files changed

+2291
-2145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+2291
-2145
lines changed
 

‎ci/code_checks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
151151

152152
MSG='Doctests generic.py' ; echo $MSG
153153
pytest -q --doctest-modules pandas/core/generic.py \
154-
-k"-_set_axis_name -_xs -describe -droplevel -groupby -interpolate -pct_change -pipe -reindex -reindex_axis -resample -to_json -transpose -values -xs"
154+
-k"-_set_axis_name -_xs -describe -droplevel -groupby -interpolate -pct_change -pipe -reindex -reindex_axis -to_json -transpose -values -xs"
155155
RET=$(($RET + $?)) ; echo $MSG "DONE"
156156

157157
MSG='Doctests top-level reshaping functions' ; echo $MSG

‎doc/source/io.rst

+37
Original file line numberDiff line numberDiff line change
@@ -4673,6 +4673,43 @@ Passing ``index=True`` will *always* write the index, even if that's not the
46734673
underlying engine's default behavior.
46744674

46754675

4676+
Partitioning Parquet files
4677+
''''''''''''''''''''''''''
4678+
4679+
.. versionadded:: 0.24.0
4680+
4681+
Parquet supports partitioning of data based on the values of one or more columns.
4682+
4683+
.. ipython:: python
4684+
4685+
df = pd.DataFrame({'a': [0, 0, 1, 1], 'b': [0, 1, 0, 1]})
4686+
df.to_parquet(fname='test', engine='pyarrow', partition_cols=['a'], compression=None)
4687+
4688+
The `fname` specifies the parent directory to which data will be saved.
4689+
The `partition_cols` are the column names by which the dataset will be partitioned.
4690+
Columns are partitioned in the order they are given. The partition splits are
4691+
determined by the unique values in the partition columns.
4692+
The above example creates a partitioned dataset that may look like:
4693+
4694+
.. code-block:: text
4695+
4696+
test
4697+
├── a=0
4698+
│ ├── 0bac803e32dc42ae83fddfd029cbdebc.parquet
4699+
│ └── ...
4700+
└── a=1
4701+
├── e6ab24a4f45147b49b54a662f0c412a3.parquet
4702+
└── ...
4703+
4704+
.. ipython:: python
4705+
:suppress:
4706+
4707+
from shutil import rmtree
4708+
try:
4709+
rmtree('test')
4710+
except Exception:
4711+
pass
4712+
46764713
.. _io.sql:
46774714

46784715
SQL Queries

0 commit comments

Comments
 (0)
Please sign in to comment.