Skip to content

Commit 9946fb7

Browse files
Ajay SaxenaAjay Saxena
authored andcommitted
Merge branch 'master' of https://github.com/pandas-dev/pandas into test_branch
pulling the latest code
2 parents c5a87d8 + a7604fc commit 9946fb7

File tree

14 files changed

+248
-44
lines changed

14 files changed

+248
-44
lines changed

ci/lint.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,24 @@ if [ "$LINT" ]; then
1010
# pandas/rpy is deprecated and will be removed.
1111
# pandas/src is C code, so no need to search there.
1212
echo "Linting *.py"
13-
flake8 pandas --filename '*.py' --exclude pandas/rpy,pandas/src
13+
flake8 pandas --filename=*.py --exclude pandas/rpy,pandas/src
14+
if [ $? -ne "0" ]; then
15+
RET=1
16+
fi
1417
echo "Linting *.py DONE"
1518

1619
echo "Linting *.pyx"
17-
flake8 pandas --filename '*.pyx' --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126
20+
flake8 pandas --filename=*.pyx --select=E501,E302,E203,E111,E114,E221,E303,E128,E231,E126
21+
if [ $? -ne "0" ]; then
22+
RET=1
23+
fi
1824
echo "Linting *.pyx DONE"
1925

2026
echo "Linting *.pxi.in"
2127
for path in 'src'
2228
do
2329
echo "linting -> pandas/$path"
24-
flake8 pandas/$path --filename '*.pxi.in' --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
30+
flake8 pandas/$path --filename=*.pxi.in --select=E501,E302,E203,E111,E114,E221,E303,E231,E126
2531
if [ $? -ne "0" ]; then
2632
RET=1
2733
fi

ci/requirements-3.5_OSX.pip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-dateutil>=2.5.0
1+
python-dateutil==2.5.3

doc/source/whatsnew.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ What's New
1818

1919
These are new features and improvements of note in each release.
2020

21+
.. include:: whatsnew/v0.19.2.txt
22+
2123
.. include:: whatsnew/v0.19.1.txt
2224

2325
.. include:: whatsnew/v0.19.0.txt

doc/source/whatsnew/v0.19.2.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.. _whatsnew_0192:
2+
3+
v0.19.2 (December ??, 2016)
4+
---------------------------
5+
6+
This is a minor bug-fix release from 0.19.1 and includes some small regression fixes,
7+
bug fixes and performance improvements.
8+
We recommend that all users upgrade to this version.
9+
10+
.. contents:: What's new in v0.19.2
11+
:local:
12+
:backlinks: none
13+
14+
15+
.. _whatsnew_0192.performance:
16+
17+
Performance Improvements
18+
~~~~~~~~~~~~~~~~~~~~~~~~
19+
20+
21+
.. _whatsnew_0192.bug_fixes:
22+
23+
Bug Fixes
24+
~~~~~~~~~
25+
26+
- compat with ``dateutil==2.6.0`` for testing (:issue:`14621`)
27+
- allow ``nanoseconds`` in ``Timestamp.replace`` kwargs (:issue:`14621`)

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ def to_json(self, path_or_buf=None, orient=None, date_format='epoch',
10661066
Handler to call if object cannot otherwise be converted to a
10671067
suitable format for JSON. Should receive a single argument which is
10681068
the object to convert and return a serialisable object.
1069-
lines : boolean, defalut False
1069+
lines : boolean, default False
10701070
If 'orient' is 'records' write out line delimited json format. Will
10711071
throw ValueError if incorrect 'orient' since others are not list
10721072
like.

pandas/core/series.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,16 +1216,10 @@ def count(self, level=None):
12161216
dtype='int64').__finalize__(self)
12171217

12181218
def mode(self):
1219-
"""Returns the mode(s) of the dataset.
1219+
"""Return the mode(s) of the dataset.
12201220
1221-
Empty if nothing occurs at least 2 times. Always returns Series even
1222-
if only one value.
1223-
1224-
Parameters
1225-
----------
1226-
sort : bool, default True
1227-
If True, will lexicographically sort values, if False skips
1228-
sorting. Result ordering when ``sort=False`` is not defined.
1221+
Empty if nothing occurs at least 2 times. Always returns Series even
1222+
if only one value is returned.
12291223
12301224
Returns
12311225
-------

pandas/io/stata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,18 +1210,18 @@ def _read_old_header(self, first_char):
12101210
if tp in self.OLD_TYPE_MAPPING:
12111211
typlist.append(self.OLD_TYPE_MAPPING[tp])
12121212
else:
1213-
typlist.append(tp - 127) # string
1213+
typlist.append(tp - 127) # py2 string, py3 bytes
12141214

12151215
try:
12161216
self.typlist = [self.TYPE_MAP[typ] for typ in typlist]
12171217
except:
12181218
raise ValueError("cannot convert stata types [{0}]"
1219-
.format(','.join(typlist)))
1219+
.format(','.join(str(x) for x in typlist)))
12201220
try:
12211221
self.dtyplist = [self.DTYPE_MAP[typ] for typ in typlist]
12221222
except:
12231223
raise ValueError("cannot convert stata dtypes [{0}]"
1224-
.format(','.join(typlist)))
1224+
.format(','.join(str(x) for x in typlist)))
12251225

12261226
if self.format_version > 108:
12271227
self.varlist = [self._null_terminate(self.path_or_buf.read(33))

pandas/io/tests/test_gbq.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,9 @@ def test_upload_data_if_table_exists_append(self):
824824
private_key=_get_private_key_path())
825825

826826
def test_upload_data_if_table_exists_replace(self):
827+
828+
raise nose.SkipTest("buggy test")
829+
827830
destination_table = DESTINATION_TABLE + "4"
828831

829832
test_size = 10

pandas/tests/indexes/test_base.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,19 @@ def test_summary(self):
913913
def test_format(self):
914914
self._check_method_works(Index.format)
915915

916-
index = Index([datetime.now()])
916+
# GH 14626
917+
# our formatting is different by definition when we have
918+
# ms vs us precision (e.g. trailing zeros);
919+
# so don't compare this case
920+
def datetime_now_without_trailing_zeros():
921+
now = datetime.now()
922+
923+
while str(now).endswith("000"):
924+
now = datetime.now()
925+
926+
return now
927+
928+
index = Index([datetime_now_without_trailing_zeros()])
917929

918930
# windows has different precision on datetime.datetime.now (it doesn't
919931
# include us since the default for Timestamp shows these but Index

pandas/tseries/offsets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def wrapper(self, other):
6868
other = other.tz_localize(None)
6969

7070
result = func(self, other)
71+
7172
if self._adjust_dst:
7273
result = tslib._localize_pydatetime(result, tz)
7374

0 commit comments

Comments
 (0)