Commit Graph

14346 Commits

Author SHA1 Message Date
gfyoung f30742feaa [Backport #14723] MAINT: Ignore .pxi files
All `.pxi` files have the warning to not edit directly, so why not
have Git ignore any changes made there?    In addition, this PR
deletes all of the `.pxi` files from the codebase because they are
automatically generated by the `` files

Author: gfyoung <>

Closes #14723 from gfyoung/gitignore-pxi-ignore and squashes the following commits:

fe0c410 [gfyoung] MAINT: Ignore .pxi files

(cherry picked from commit ee108164ee)
2016-12-15 10:15:15 +01:00
Matti Picus a2f8cdccbd [Backport #14731] CLN: move assignment from header into cython (#14731)
(cherry picked from commit 26a72e115d)
2016-12-15 10:13:55 +01:00
gfyoung 33e5342c2a [Backport #14717] BUG: Respect the dtype parameter for empty CSV (#14717)
(cherry picked from commit 75b606abad)
2016-12-14 17:51:35 +01:00
Dave Willmer 4cb1d73827 [Backport #14718] DOC: fix typo in merge_asof docstring examples (#14718)
(cherry picked from commit 4143b323f5)
2016-12-14 17:50:02 +01:00
Jeff Reback 02bd86aafa TST: skip test_transactions in sqlitefallback on py3.6
(cherry picked from commit 880de3054c)
2016-12-14 17:48:43 +01:00
Julian Santander fcd996a5b7 [Backport #14683] BUG: Avoid AmbiguousTimeError on groupby
closes #14682

Author: Julian Santander <>
Author: Julian Santander <>

Closes #14683 from j-santander/master and squashes the following commits:

d90afaf [Julian Santander] Addressing additional code inspection comments
817ed97 [Julian Santander] Addressing code inspections comments
99a5367 [Julian Santander] Fix unittest error and lint warning
940fb22 [Julian Santander] Avoid AmbiguousTimeError on groupby

(cherry picked from commit 9f2e45378c)
2016-12-14 17:47:40 +01:00
Ben Kandel 57482f7e62 [Backport #14596] BUG: Fix parse empty df
closes #14515

This commit fixes a bug where `read_csv` failed when given a file with
a multiindex header and empty content. Because pandas reads index
names as a separate line following the header lines, the reader looks
for the line with index names in it. If the content of the dataframe
is empty, the reader will choke. This bug surfaced after stopped writing an
extra line after multiindex columns, which led to a situation where
pandas could write CSV's that it couldn't then read.     This commit
changes that behavior by explicitly checking if the index name row
exists, and processing it correctly if it doesn't.

Author: Ben Kandel <>

Closes #14596 from bkandel/fix-parse-empty-df and squashes the following commits:

32e3b0a [Ben Kandel] lint
e6b1237 [Ben Kandel] lint
fedfff8 [Ben Kandel] fix multiindex column parsing
518982d [Ben Kandel] move to 0.19.2
fc23e5c [Ben Kandel] fix errant this_columns
3d9bbdd [Ben Kandel] whatsnew
68eadf3 [Ben Kandel] Modify test.
17e44dd [Ben Kandel] fix python parser too
72adaf2 [Ben Kandel] remove unnecessary test
bfe0423 [Ben Kandel] typo
2f64d57 [Ben Kandel] pep8
b8200e4 [Ben Kandel] BUG: read_csv with empty df

(cherry picked from commit f862b52e75)
2016-12-14 17:46:54 +01:00
Joe Jevnik 56c6171e23 [Backport #14695] BUG: Fix move_into_mutable_buffer for python 3.6.
In python 3.6, the CALL_FUNCTION handling was updated. One change is
that when calling a C function from a python function python now
counts  the reference owned by the argument tuple. This means that
move was  always seeing objects with two references instead of the
expected  one.    Python 3.6 also removed a copy in the argument tuple
when *unpacking  functions. This means that if a user does:    tuple =
(create_string(),)  move_into_mutable_buffer(*tuple)    where
create_string() creates a string object with one reference then we
will fail to raise a BadMove even though the user could later retrieve
that string with tuple[0]. There is no way to detect this case so this
patch adds a warning to the docstring advising against star unpacking.
xref: #14679    I played around with removing the extra reference that
was added in 3.6 but it looks like playing with borrowed refs
everywhere will be a bit tricky. This change should clear things up
for 3.6 while continuing to work for older versions. In 3.6 you
__could__ get a shared mutable string from this but you need to try
pretty hard for it.

Author: Joe Jevnik <>

Closes #14695 from llllllllll/move-3.6-compat and squashes the following commits:

d1e8b1b [Joe Jevnik] BUG: Fix move_into_mutable_buffer for python 3.6.

(cherry picked from commit f60964092d)
2016-12-14 17:46:07 +01:00
Ajay Saxena 6f55ab93fa BUG in clipboard (linux, python2) with unicode and separator (GH13747)
vendered updated version of Pyperclip

closes #13747
closes #14362
closes #12807
closes #12529

Author: Ajay Saxena <ajasaxen@Ajays-MacBook-Pro.local>
Author: Ajay Saxena <>

Closes #14599 from aileronajay/master and squashes the following commits:

2aafb66 [Ajay Saxena] moved comment inside test and added github issue labels to test
b74fbc1 [Ajay Saxena] ignore lint test for pyperclip files
9db42d8 [Ajay Saxena] whatsnew conflict
1dca292 [Ajay Saxena] conflict resolution
98b61e8 [Ajay Saxena] merge conflict
cedb690 [Ajay Saxena] merge conflict in whats new file
7af95da [Ajay Saxena] merging lastest changes
ac8ae60 [Ajay Saxena] skip clipboard test if clipboard primitives are absent
b03ed56 [Ajay Saxena] changed whatsnew file
c0aafd7 [Ajay Saxena] Merge branch 'test_branch'
9946fb7 [Ajay Saxena] Merge branch 'master' of into test_branch
ed1375f [Ajay Saxena] Merge branch 'test_branch'
0665fd4 [Ajay Saxena] fixed linting and test case as per code review
d202fd0 [Ajay Saxena] added test for valid encoding, modified so that pandas/util/clipboard can be found
dd57ae3 [Ajay Saxena] code review changes and read clipboard invalid encoding test
71d58d0 [Ajay Saxena] testing encoding in kwargs to to_clipboard and test case for the same
02f87b0 [Ajay Saxena] removed duplicate files
825bbe2 [Ajay Saxena] all files related to pyperclip are under pandas.util.clipboard
c5a87d8 [Ajay Saxena] Merge branch 'test_branch' of into test_branch
f708c2e [Ajay Saxena] Merge branch 'master' of
d565b1f [Ajay Saxena] updated pyperclip to the latest version
14d94a0 [Ajay Saxena] changed the pandas util clipboard file to return unicode if the python version is 2, else str
66d8ebf [Ajay Saxena] removed the disabled tag for clipboard test so that we can check if they pass after this change
edb8553 [Ajay Saxena] refactored the new unicode test to be in sync with the rest of the file
c83d000 [Ajay Saxena] added test case for unicode round trip
fb922d6 [Ajay Saxena] changes for GH 13747

(cherry picked from commit 4a1a330343)
2016-12-14 17:44:49 +01:00
Jeff Reback e5a965b05c DOC: compat notice for 3.6
(cherry picked from commit dca0185388)
2016-12-14 17:43:53 +01:00
Jeff Reback 4fba878d0b COMPAT: pickle compat for Timestamp in py3.6
BUG: fix unorderable exception types in py3.6

closes #14689

(cherry picked from commit 2d8160e8c4)
2016-12-14 17:43:37 +01:00
Jeff Reback 645cf93e2a [Backport #14684] ERR: more informative message on invalid Timestamp input
TST: fix unordable error message

xref #14679

TST: handle unorderable exceptions in indexing

closes #14684

(cherry picked from commit b6ffd89fa5)
2016-12-14 17:43:09 +01:00
Jeff Reback d7b1661e29 [Backport #14685] BUG: fix pickling of Custom offsets in 3.6
xref #14679

Author: Jeff Reback <>

Closes #14685 from jreback/offsets and squashes the following commits:

8ad212c [Jeff Reback] BUG: fix pickling of Custom offsets in 3.6

(cherry picked from commit bec5bdb891)
2016-12-14 17:42:14 +01:00
Jeff Reback 332df4a3ab COMPAT: remove some deprecation warnings in 3.6
partial on #14679

Author: Jeff Reback <>

Closes #14681 from jreback/warnings and squashes the following commits:

56e7b1b [Jeff Reback] COMPAT: remove some deprecation warnings in 3.6

(cherry picked from commit 748000d220)

Fixed conflicts in:
2016-12-14 17:41:32 +01:00
Jeff Reback d317905be2 BLD: cleaner 3.6 deps install
(cherry picked from commit 45543ec22b)
2016-12-14 17:40:13 +01:00
Jeff Reback d34dd9d551 BLD: use correct path for travis
(cherry picked from commit 908c224261)
2016-12-14 17:39:46 +01:00
Jeff Reback 58566e91ef BLD: use miniconda3 as the miniconda dir
(cherry picked from commit 313b8e4a3f)
2016-12-14 17:39:39 +01:00
Jeff Reback ef91dcca27 [Backport #14678] ERR: fix exception propogation for datetime parsing functions, noted in python 3.6
closes #14561

Author: Jeff Reback <>

Closes #14678 from jreback/py3.6_fix and squashes the following commits:

c8eed83 [Jeff Reback] ERR: fix exception propogation for datetime parsing functions, noted in python 3.6

(cherry picked from commit b52dda8fa4)
2016-12-14 17:37:45 +01:00
Jeff Reback 8bef1e236b BLD: add py3.6 build
generic support for additional installation instructions (e.g. 3.4_slow build)
remove 2.7_NUMPY_DEV build files (not longer on travis)
use python 3.5 for root conda env, use PYTHON_VERSION to designate conda installation

(cherry picked from commit b23a329edf)
2016-12-14 17:37:21 +01:00
Nicholas Ver Halen 53eb9995dc BUG: to_numeric downcast = 'unsigned' would not un-sign a 0 value
closes #14504
closes #14401

(cherry picked from commit b5864b0af0)
2016-12-14 17:37:11 +01:00
Jeff Reback 25782facfd DOC: add whitespace to bug fix section of 0.19.2
(cherry picked from commit 7e66937976)
2016-12-14 17:35:46 +01:00
Kevin Sheppard 36fc61e5c6 ENH: Explicit range checking of floats when writing Stata
Add explicit error checking for out-of-range doubles when writing Stata files
Upcasts float32 to float64 if out-of-range values encountered
Tests for infinite values and raises if found

closes #14618
closes #14637

(cherry picked from commit fe555db3f1)
2016-12-14 17:35:30 +01:00
Luca Scarabello 8e31489fd0 [Backport #14663] BUG: pandas.cut and negative values #14652
closes #14652

Author: Luca Scarabello <>
Author: Luca <>

Closes #14663 from luca-s/issue_14652 and squashes the following commits:

8db26db [Luca Scarabello] Moved new test location to pandas\tools\tests\
90dd07d [Luca Scarabello] Updated whatsnew
d6b3da8 [Luca Scarabello] fixed flake8 compliance
fdc55b9 [Luca Scarabello] Added test case for #14652
d5790e2 [Luca Scarabello] updated whatsnew v0.19.2
2db0c7a [Luca] BUG: pandas.cut and negative values #14652

(cherry picked from commit 2fc0c68ace)
2016-12-14 17:34:32 +01:00
Joe Jevnik 58b2f669f8 [Backport #14494] BUG: don't allow users to move from an interned string (#14494)
(cherry picked from commit 726efc7cd5)
2016-12-14 17:33:43 +01:00
Jeff Reback 64b11684c7 BLD: fix linting check for .pyx
closes #14659

(cherry picked from commit 52241a7d8a)
2016-12-14 17:32:30 +01:00
Tom Augspurger 826b076cc2 [Backport #14657] COMPAT: Cast to string before raise in read_stata (#14657)
Fix ValueError message in StataReader

Cast to string before joining the list of typecodes in the error message.
(cherry picked from commit 1606153c0e)
2016-12-14 17:29:43 +01:00
Jeff Reback a0c463744a TST: skip test_gbq.test_upload_data_if_table_exists_replace for now
(cherry picked from commit 1d6dbb41b2)
2016-12-14 17:29:10 +01:00
Mykola Golubyev ba35ea91a9 TST: Fix trailing current date zeros flaky test_format problem
closes #14626

Author: Mykola Golubyev <>

Closes #14638 from MykolaGolubyev/issue-14626 and squashes the following commits:

166ec23 [Mykola Golubyev] Inline datetime_now_without_trailing_zeros within test_format
68a72a7 [Mykola Golubyev] Fix trailing current date zeros flaky test_format problem

(cherry picked from commit 3552dc0c45)
2016-12-14 17:28:58 +01:00
Jeff Reback aaf1a56ec3 BUG: segfault manifesting with dateutil=2.6 w.r.t. replace when timezones are present
closes #14621

Author: Jeff Reback <>

Closes #14631 from jreback/replace and squashes the following commits:

3f95042 [Jeff Reback] BUG: segfault manifesting with dateutil=2.6 w.r.t. replace when timezones are present

(cherry picked from commit f8bd08e9c2)
2016-12-14 17:28:01 +01:00
Jeff Reback 071c06729e DOC: setup for 0.19.2
(cherry picked from commit 46000daf25)
2016-12-14 17:26:34 +01:00
Joris Van den Bossche 27b7839862 RLS: v0.19.1 2016-11-03 15:19:55 +01:00
Joris Van den Bossche 84eb87557e DOC: update whatsnew/release notes for 0.19.1 (#14573)
(cherry picked from commit e1cdc4b83d)
2016-11-03 15:18:45 +01:00
Joris Van den Bossche dbc19da84e [Backport #14545] BUG/API: Index.append with mixed object/Categorical indices (#14545)
* BUG/API: Index.append with mixed object/Categorical indices

* Only coerce to object if the calling index is not categorical

* Add test for the case (GH14298)

(cherry picked from commit 252526cc0f)
2016-11-03 12:42:15 +01:00
Joris Van den Bossche 5491ed2e69 DOC: rst fixes
(cherry picked from commit 7f0c4e084d)
2016-11-03 12:42:03 +01:00
Joris Van den Bossche 8d8b7950c3 [Backport #14567] DEPR: add deprecation warning for com.array_equivalent (#14567)
pandas.core.common.array_equivalent was removed without deprecation warning.
This commits adds it back to the core.common namespace with deprecation warning
(cherry picked from commit 093aa8231e)
2016-11-03 12:41:33 +01:00
Joris Van den Bossche a95ce63729 [Backport #14551] PERF: casting loc to labels dtype before searchsorted (#14551)
(cherry picked from commit 1d95179418)
2016-11-03 12:41:03 +01:00
Joris Van den Bossche 4c42422f99 [Backport #14536] BUG: DataFrame.quantile with NaNs (GH14357) (#14536)
(cherry picked from commit 52f31d470d)
2016-11-03 12:40:37 +01:00
Joris Van den Bossche e7d787260a [Backport #14520] BUG: don't close user-provided file handles in C parser (GH14418) (#14520)
(cherry picked from commit eb7bd993da)
2016-11-03 12:40:12 +01:00
Brandon M. Burroughs 2ca29ef23b [Backport #14392] BUG: Dataframe constructor when given dict with None value (#14392)
(cherry picked from commit 60a335e457)
2016-11-02 12:24:21 +01:00
gfyoung e8a71a3e41 [Backport #14514] BUG: Don't parse inline quotes in skipped lines (#14514)
Closes gh-14459.
(cherry picked from commit b088112204)
2016-11-02 12:23:50 +01:00
Piotr Chromiec 1b0ffaa7e0 [Bacport #14543] BUG: tseries ceil doc fix (#14543)
(cherry picked from commit 47f117d18a)
2016-11-02 11:54:18 +01:00
Anthonios Partheniou 01b2af36f9 [Backport #14541] DOC: Simplify the gbq integration testing procedure for contributors (#14541)
(cherry picked from commit 1ce62992ac)
2016-11-02 11:53:28 +01:00
Joris Van den Bossche aed14ddd53 [Backport #14527] BUG/ERR: raise correct error when sql driver is not installed (#14527)
When the driver was not installed, but sqlalchemy itself was, when passing a URI string, you got an error indicating that SQLAlchemy was not installed, instead of the driver not being installed. This was because the import error for the driver was captured as import error for sqlalchemy.
(cherry picked from commit 7f5a45c1b3)
2016-11-02 11:52:32 +01:00
Joris Van den Bossche 796e4efe17 [Backport #14501] BUG: fix DatetimeIndex._maybe_cast_slice_bound for empty index (GH14354) (#14501)
(cherry picked from commit d7fb5bd310)
2016-11-02 11:51:53 +01:00
Chris Warth b65aab6b5f [Backport #14442] DOC: Expand on reference docs for read_json() (#14442)
(cherry picked from commit e7ac84d298)
2016-11-02 11:51:19 +01:00
Jeff Reback 033fdef28b BLD: fix 3.4 build for cython to 0.24.1
(cherry picked from commit 6ac759d5e2)
2016-11-02 11:50:43 +01:00
gfyoung 64400670e6 [Backport #14492] BUG: Accept unicode quotechars again in pd.read_csv
Title is self-explanatory.  Affects Python 2.x only.  Closes #14477.

Author: gfyoung <>

Closes #14492 from gfyoung/quotechar-unicode-2.x and squashes the following commits:

ec9f59a [gfyoung] BUG: Accept unicode quotechars again in pd.read_csv

(cherry picked from commit 6130e77fb7)
2016-11-02 11:49:47 +01:00
Robert Bradshaw ebe6319c98 [Backport #14496] BLD: Support Cython 0.25
closes #14496

(cherry picked from commit 66b4c835f3)
2016-11-02 11:49:20 +01:00
Jeff Reback 135286be6d [Backport #14498] COMPAT/TST: fix test for range testing of negative integers to neg powers
xref    closes #14489

Author: Jeff Reback <>

Closes #14498 from jreback/compat and squashes the following commits:

882872e [Jeff Reback] COMPAT/TST: fix test for range testing of negative integers to neg powers

(cherry picked from commit 050bf60edd)
2016-11-02 11:48:43 +01:00
Larry Ren 90aef736be [Backport #14476] PERF: performance regression in Series.asof (#14476)
* Fix performance regression in Series.asof by avoiding pre-computing nulls and returning value by indexing the underlying ndarray.
(cherry picked from commit e3d943d187)
2016-11-02 11:48:09 +01:00