Skip to content

Commit b5d7629

Browse files
committed
Merge remote-tracking branch 'upstream/master' into fix-unsupported-seek-for-httpresponse
2 parents f1e50d1 + 6eda77e commit b5d7629

File tree

158 files changed

+4925
-3533
lines changed

Some content is hidden

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

158 files changed

+4925
-3533
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ matrix:
5656
# In allow_failures
5757
- dist: trusty
5858
env:
59-
- JOB="2.7_SLOW" SLOW=true
59+
- JOB="3.6_SLOW" SLOW=true
6060
# In allow_failures
6161
- dist: trusty
6262
env:
@@ -72,7 +72,7 @@ matrix:
7272
allow_failures:
7373
- dist: trusty
7474
env:
75-
- JOB="2.7_SLOW" SLOW=true
75+
- JOB="3.6_SLOW" SLOW=true
7676
- dist: trusty
7777
env:
7878
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"

asv_bench/benchmarks/frame_ctor.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class FromDicts(object):
1616

1717
def setup(self):
1818
N, K = 5000, 50
19-
index = tm.makeStringIndex(N)
20-
columns = tm.makeStringIndex(K)
21-
frame = DataFrame(np.random.randn(N, K), index=index, columns=columns)
19+
self.index = tm.makeStringIndex(N)
20+
self.columns = tm.makeStringIndex(K)
21+
frame = DataFrame(np.random.randn(N, K), index=self.index,
22+
columns=self.columns)
2223
self.data = frame.to_dict()
23-
self.some_dict = list(self.data.values())[0]
2424
self.dict_list = frame.to_dict(orient='records')
2525
self.data2 = {i: {j: float(j) for j in range(100)}
2626
for i in range(2000)}
@@ -31,8 +31,14 @@ def time_list_of_dict(self):
3131
def time_nested_dict(self):
3232
DataFrame(self.data)
3333

34-
def time_dict(self):
35-
Series(self.some_dict)
34+
def time_nested_dict_index(self):
35+
DataFrame(self.data, index=self.index)
36+
37+
def time_nested_dict_columns(self):
38+
DataFrame(self.data, columns=self.columns)
39+
40+
def time_nested_dict_index_columns(self):
41+
DataFrame(self.data, index=self.index, columns=self.columns)
3642

3743
def time_nested_dict_int64(self):
3844
# nested dict, integer indexes, regression described in #621

asv_bench/benchmarks/io/csv.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -118,38 +118,6 @@ def time_read_uint64_na_values(self):
118118
na_values=self.na_values)
119119

120120

121-
class S3(object):
122-
# Make sure that we can read part of a file from S3 without
123-
# needing to download the entire thing. Use the timeit.default_timer
124-
# to measure wall time instead of CPU time -- we want to see
125-
# how long it takes to download the data.
126-
timer = timeit.default_timer
127-
params = ([None, "gzip", "bz2"], ["python", "c"])
128-
param_names = ["compression", "engine"]
129-
130-
def setup(self, compression, engine):
131-
if compression == "bz2" and engine == "c" and PY2:
132-
# The Python 2 C parser can't read bz2 from open files.
133-
raise NotImplementedError
134-
try:
135-
import s3fs # noqa
136-
except ImportError:
137-
# Skip these benchmarks if `boto` is not installed.
138-
raise NotImplementedError
139-
140-
ext = ""
141-
if compression == "gzip":
142-
ext = ".gz"
143-
elif compression == "bz2":
144-
ext = ".bz2"
145-
self.big_fname = "s3://pandas-test/large_random.csv" + ext
146-
147-
def time_read_csv_10_rows(self, compression, engine):
148-
# Read a small number of rows from a huge (100,000 x 50) table.
149-
read_csv(self.big_fname, nrows=10, compression=compression,
150-
engine=engine)
151-
152-
153121
class ReadCSVThousands(BaseIO):
154122

155123
goal_time = 0.2

asv_bench/benchmarks/timeseries.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ def setup(self):
7575
freq='S'))
7676

7777
def time_infer_dst(self):
78-
with warnings.catch_warnings(record=True):
79-
self.index.tz_localize('US/Eastern', infer_dst=True)
78+
self.index.tz_localize('US/Eastern', ambiguous='infer')
8079

8180

8281
class ResetIndex(object):

ci/build_docs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if [ "$DOC" ]; then
2424
source activate pandas
2525

2626
mv "$TRAVIS_BUILD_DIR"/doc /tmp
27+
mv "$TRAVIS_BUILD_DIR/LICENSE" /tmp # included in the docs.
2728
cd /tmp/doc
2829

2930
echo ###############################

ci/lint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ if [ "$LINT" ]; then
165165
RET=1
166166
fi
167167
echo "Check for deprecated messages without sphinx directive DONE"
168+
169+
echo "Check for old-style classes"
170+
grep -R --include="*.py" -E "class\s\S*[^)]:" pandas scripts
171+
172+
if [ $? = "0" ]; then
173+
RET=1
174+
fi
175+
echo "Check for old-style classes DONE"
168176

169177
else
170178
echo "NOT Linting"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
python=2.7*
1+
python=3.6*
22
python-dateutil
33
pytz
4-
numpy=1.10*
4+
numpy
55
cython
File renamed without changes.

ci/requirements-2.7_SLOW.run renamed to ci/requirements-3.6_SLOW.run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
python-dateutil
22
pytz
3-
numpy=1.10*
4-
matplotlib=1.4.3
3+
numpy
4+
matplotlib
55
scipy
66
patsy
77
xlwt

doc/source/_static/print_df_new.png

75.4 KB
Loading

doc/source/_static/print_df_old.png

87.1 KB
Loading

doc/source/api.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2557,6 +2557,8 @@ objects.
25572557
generated/pandas.Index.asi8
25582558
generated/pandas.Index.data
25592559
generated/pandas.Index.flags
2560+
generated/pandas.Index.holds_integer
2561+
generated/pandas.Index.is_type_compatible
25602562
generated/pandas.Index.nlevels
25612563
generated/pandas.Index.sort
25622564
generated/pandas.Panel.agg
@@ -2572,4 +2574,5 @@ objects.
25722574
generated/pandas.Series.blocks
25732575
generated/pandas.Series.from_array
25742576
generated/pandas.Series.ix
2575-
generated/pandas.Timestamp.offset
2577+
generated/pandas.Series.imag
2578+
generated/pandas.Series.real

doc/source/comparison_with_r.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ In Python, this list would be a list of tuples, so
397397
pd.DataFrame(a)
398398
399399
For more details and examples see :ref:`the Into to Data Structures
400-
documentation <basics.dataframe.from_items>`.
400+
documentation <dsintro>`.
401401

402402
|meltdf|_
403403
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)