Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8304221
Implement _is_utc in timezones
jbrockmendel Sep 1, 2017
82b1da7
Dont declare _is_utc in tslib
jbrockmendel Sep 2, 2017
a74e7fa
Remove unused imports
jbrockmendel Sep 5, 2017
b110f96
DOC: Cleaned references to pandas <v0.12 in docs (#17375)
topper-123 Sep 2, 2017
d8ea8f4
Remove unused _day and _month attrs (#17431)
jbrockmendel Sep 4, 2017
42e5e4d
DOC: Clean-up references to v12 to v14 (both included) (#17420)
topper-123 Sep 5, 2017
870e6a4
BUG: Plotting Timedelta on y-axis #16953 (#17430)
s-weigand Sep 6, 2017
07edd07
COMPAT: handle pyarrow deprecation of timestamps_to_ms in .from_panda…
jreback Sep 6, 2017
708e4e6
DOC/TST: Add examples to MultiIndex.get_level_values + related change…
topper-123 Sep 6, 2017
b507379
Dont re-pin total_seconds as it is already implemented (#17432)
jbrockmendel Sep 7, 2017
991af8f
BUG: Return local Timestamp.weekday_name attribute (#17354) (#17377)
mroeschke Sep 7, 2017
c877772
BUG: intersection of decreasing RangeIndexes (#17374)
toobaz Sep 7, 2017
f8ce1ad
Remove property that re-computed microsecond (#17331)
jbrockmendel Sep 7, 2017
57c2d55
cleaned references to pandas v0.15 and v0.16 in docs (#17442)
topper-123 Sep 7, 2017
2638a20
BUG: revert collision warning (#17298)
deniederhut Sep 7, 2017
a5ee65e
cdef out dtype for _Timestamp._get_field (#17457)
mroeschke Sep 7, 2017
69ca387
DOC: Add Timestamp, Period, Timedelta, and Interval to api.rst (#17424)
GuessWhoSamFoo Sep 7, 2017
c12062c
DOC: to_json (#17461)
majiang Sep 7, 2017
2be1405
BUG: Index._searchsorted_monotonic(..., side='right') returns the lef…
jschendel Sep 7, 2017
aafa941
COMPAT: Pypy tweaks (#17351)
mattip Sep 7, 2017
1c01a2b
Replace * imports with explicit imports; remove unused declared const…
jbrockmendel Sep 8, 2017
e0e837a
Removed Timedelta.is_populated and fixed spelling errors (#17469)
GuessWhoSamFoo Sep 8, 2017
72da858
PERF: Implement get_freq_code in cython frequencies (#17422)
jbrockmendel Sep 8, 2017
b65f926
Merge branch 'master' into tslibs-timezones2
jbrockmendel Sep 8, 2017
7f53450
Merge branch 'master' into tslibs-timezones2
jbrockmendel Sep 8, 2017
68864b5
Merge branch 'master' of https://github.com/pandas-dev/pandas into ts…
jbrockmendel Sep 10, 2017
6f19d50
Merge branch 'tslibs-timezones2' of https://github.com/jbrockmendel/p…
jbrockmendel Sep 10, 2017
87482c2
whitespace cleanup
jbrockmendel Sep 10, 2017
7985ee2
Remove extraneous depends from setup
jbrockmendel Sep 10, 2017
fb55a8c
Remove accidentally re-introduced dependency
jbrockmendel Sep 11, 2017
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
COMPAT: handle pyarrow deprecation of timestamps_to_ms in .from_panda…
…s with pyarrow < 0.6.0 (#17447) closes #17438
  • Loading branch information
jreback authored and jbrockmendel committed Sep 8, 2017
commit 07edd078b00fbf4bc0a6f25b326e15eb6b0c0732
2 changes: 1 addition & 1 deletion ci/requirements-3.5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ echo "install 35"
conda remove -n pandas python-dateutil --force
pip install python-dateutil

conda install -n pandas -c conda-forge feather-format pyarrow=0.4.1
conda install -n pandas -c conda-forge feather-format pyarrow=0.5.0
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.21.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Other Enhancements
- :func:`DataFrame.select_dtypes` now accepts scalar values for include/exclude as well as list-like. (:issue:`16855`)
- :func:`date_range` now accepts 'YS' in addition to 'AS' as an alias for start of year (:issue:`9313`)
- :func:`date_range` now accepts 'Y' in addition to 'A' as an alias for end of year (:issue:`9313`)
- Integration with `Apache Parquet <https://parquet.apache.org/>`__, including a new top-level :func:`read_parquet` and :func:`DataFrame.to_parquet` method, see :ref:`here <io.parquet>`.
- Integration with `Apache Parquet <https://parquet.apache.org/>`__, including a new top-level :func:`read_parquet` and :func:`DataFrame.to_parquet` method, see :ref:`here <io.parquet>`. (:issue:`15838`, :issue:`17438`)
- :func:`DataFrame.add_prefix` and :func:`DataFrame.add_suffix` now accept strings containing the '%' character. (:issue:`17151`)
- `read_*` methods can now infer compression from non-string paths, such as ``pathlib.Path`` objects (:issue:`17206`).
- :func:`pd.read_sas()` now recognizes much more of the most frequently used date (datetime) formats in SAS7BDAT files (:issue:`15871`).
Expand Down
18 changes: 14 additions & 4 deletions pandas/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,23 @@ def __init__(self):
"\nor via pip\n"
"pip install -U pyarrow\n")

self._pyarrow_lt_050 = LooseVersion(pyarrow.__version__) < '0.5.0'
self._pyarrow_lt_060 = LooseVersion(pyarrow.__version__) < '0.6.0'
self.api = pyarrow

def write(self, df, path, compression='snappy', **kwargs):
def write(self, df, path, compression='snappy',
coerce_timestamps='ms', **kwargs):
path, _, _ = get_filepath_or_buffer(path)
table = self.api.Table.from_pandas(df, timestamps_to_ms=True)
self.api.parquet.write_table(
table, path, compression=compression, **kwargs)
if self._pyarrow_lt_060:
table = self.api.Table.from_pandas(df, timestamps_to_ms=True)
self.api.parquet.write_table(
table, path, compression=compression, **kwargs)

else:
table = self.api.Table.from_pandas(df)
self.api.parquet.write_table(
table, path, compression=compression,
coerce_timestamps=coerce_timestamps, **kwargs)

def read(self, path):
path, _, _ = get_filepath_or_buffer(path)
Expand Down