Skip to content

Commit 3c13163

Browse files
committed
Merge branch 'master' into PR_TOOL_MERGE_PR_17453
2 parents 1a15209 + c0e3767 commit 3c13163

File tree

385 files changed

+12166
-11167
lines changed

Some content is hidden

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

385 files changed

+12166
-11167
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of
4+
fostering an open and welcoming community, we pledge to respect all people who
5+
contribute through reporting issues, posting feature requests, updating
6+
documentation, submitting pull requests or patches, and other activities.
7+
8+
We are committed to making participation in this project a harassment-free
9+
experience for everyone, regardless of level of experience, gender, gender
10+
identity and expression, sexual orientation, disability, personal appearance,
11+
body size, race, ethnicity, age, religion, or nationality.
12+
13+
Examples of unacceptable behavior by participants include:
14+
15+
* The use of sexualized language or imagery
16+
* Personal attacks
17+
* Trolling or insulting/derogatory comments
18+
* Public or private harassment
19+
* Publishing other's private information, such as physical or electronic
20+
addresses, without explicit permission
21+
* Other unethical or unprofessional conduct
22+
23+
Project maintainers have the right and responsibility to remove, edit, or
24+
reject comments, commits, code, wiki edits, issues, and other contributions
25+
that are not aligned to this Code of Conduct, or to ban temporarily or
26+
permanently any contributor for other behaviors that they deem inappropriate,
27+
threatening, offensive, or harmful.
28+
29+
By adopting this Code of Conduct, project maintainers commit themselves to
30+
fairly and consistently applying these principles to every aspect of managing
31+
this project. Project maintainers who do not follow or enforce the Code of
32+
Conduct may be permanently removed from the project team.
33+
34+
This Code of Conduct applies both within project spaces and in public spaces
35+
when an individual is representing the project or its community.
36+
37+
A working group of community members is committed to promptly addressing any
38+
reported issues. The working group is made up of pandas contributors and users.
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
40+
reported by contacting the working group by e-mail (pandas-coc@googlegroups.com).
41+
Messages sent to this e-mail address will not be publicly visible but only to
42+
the working group members. The working group currently includes
43+
44+
- Safia Abdalla
45+
- Tom Augspurger
46+
- Joris Van den Bossche
47+
- Camille Scott
48+
- Nathaniel Smith
49+
50+
All complaints will be reviewed and investigated and will result in a response
51+
that is deemed necessary and appropriate to the circumstances. Maintainers are
52+
obligated to maintain confidentiality with regard to the reporter of an
53+
incident.
54+
55+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
56+
version 1.3.0, available at
57+
[http://contributor-covenant.org/version/1/3/0/][version],
58+
and the [Swift Code of Conduct][swift].
59+
60+
[homepage]: http://contributor-covenant.org
61+
[version]: http://contributor-covenant.org/version/1/3/0/
62+
[swift]: https://swift.org/community/#code-of-conduct
63+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
.ipynb_checkpoints
2222
.tags
2323
.cache/
24+
.vscode/
2425

2526
# Compiled source #
2627
###################

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ matrix:
5151
- python-gtk2
5252
- dist: trusty
5353
env:
54-
- JOB="3.5" TEST_ARGS="--skip-slow --skip-network" COVERAGE=true
54+
- JOB="3.5_CONDA_BUILD_TEST" TEST_ARGS="--skip-slow --skip-network" CONDA_BUILD_TEST=true
5555
- dist: trusty
5656
env:
57-
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true
57+
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true COVERAGE=true
5858
# In allow_failures
5959
- dist: trusty
6060
env:
6161
- JOB="2.7_SLOW" SLOW=true
6262
# In allow_failures
6363
- dist: trusty
6464
env:
65-
- JOB="3.6_BUILD_TEST" TEST_ARGS="--skip-slow" BUILD_TEST=true
65+
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
6666
addons:
6767
apt:
6868
packages:
@@ -81,7 +81,7 @@ matrix:
8181
- JOB="2.7_SLOW" SLOW=true
8282
- dist: trusty
8383
env:
84-
- JOB="3.6_BUILD_TEST" TEST_ARGS="--skip-slow" BUILD_TEST=true
84+
- JOB="3.6_PIP_BUILD_TEST" TEST_ARGS="--skip-slow" PIP_BUILD_TEST=true
8585
addons:
8686
apt:
8787
packages:

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,9 @@ pip install pandas
160160
```
161161

162162
## Dependencies
163-
- [NumPy](http://www.numpy.org): 1.7.0 or higher
164-
- [python-dateutil](https://labix.org/python-dateutil): 1.5 or higher
165-
- [pytz](https://pythonhosted.org/pytz)
166-
- Needed for time zone support with ``pandas.date_range``
163+
- [NumPy](http://www.numpy.org): 1.9.0 or higher
164+
- [python-dateutil](https://labix.org/python-dateutil): 2.5.0 or higher
165+
- [pytz](https://pythonhosted.org/pytz): 2011k or higher
167166

168167
See the [full installation instructions](https://pandas.pydata.org/pandas-docs/stable/install.html#dependencies)
169168
for recommended and optional dependencies.
@@ -205,9 +204,6 @@ See the full instructions for [installing from source](https://pandas.pydata.org
205204
## Documentation
206205
The official documentation is hosted on PyData.org: https://pandas.pydata.org/pandas-docs/stable
207206

208-
The Sphinx documentation should provide a good starting point for learning how
209-
to use the library. Expect the docs to continue to expand as time goes on.
210-
211207
## Background
212208
Work on ``pandas`` started at AQR (a quantitative hedge fund) in 2008 and
213209
has been under active development since then.

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ matrix:
1111
environment:
1212
global:
1313
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
14-
# /E:ON and /V:ON options are not enabled in the batch script intepreter
14+
# /E:ON and /V:ON options are not enabled in the batch script interpreter
1515
# See: http://stackoverflow.com/a/13751649/163740
1616
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\run_with_env.cmd"
1717
clone_folder: C:\projects\pandas
18+
PANDAS_TESTING_MODE: "deprecate"
1819

1920
matrix:
2021

asv_bench/benchmarks/ctors.py

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,66 @@
11
import numpy as np
2-
from pandas import DataFrame, Series, Index, DatetimeIndex, Timestamp
2+
import pandas.util.testing as tm
3+
from pandas import Series, Index, DatetimeIndex, Timestamp, MultiIndex
34

4-
from .pandas_vb_common import setup # noqa
5+
from .pandas_vb_common import setup # noqa
56

67

7-
class Constructors(object):
8+
class SeriesConstructors(object):
9+
10+
goal_time = 0.2
11+
12+
param_names = ["data_fmt", "with_index"]
13+
params = [[lambda x: x,
14+
list,
15+
lambda arr: list(arr.astype(str)),
16+
lambda arr: dict(zip(range(len(arr)), arr)),
17+
lambda arr: [(i, -i) for i in arr],
18+
lambda arr: [[i, -i] for i in arr],
19+
lambda arr: ([(i, -i) for i in arr][:-1] + [None]),
20+
lambda arr: ([[i, -i] for i in arr][:-1] + [None])],
21+
[False, True]]
22+
23+
def setup(self, data_fmt, with_index):
24+
N = 10**4
25+
arr = np.random.randn(N)
26+
self.data = data_fmt(arr)
27+
self.index = np.arange(N) if with_index else None
28+
29+
def time_series_constructor(self, data_fmt, with_index):
30+
Series(self.data, index=self.index)
31+
32+
33+
class SeriesDtypesConstructors(object):
834

935
goal_time = 0.2
1036

1137
def setup(self):
12-
N = 10**2
38+
N = 10**4
1339
self.arr = np.random.randn(N, N)
1440
self.arr_str = np.array(['foo', 'bar', 'baz'], dtype=object)
15-
16-
self.data = np.random.randn(N)
17-
self.index = Index(np.arange(N))
18-
1941
self.s = Series([Timestamp('20110101'), Timestamp('20120101'),
2042
Timestamp('20130101')] * N * 10)
2143

22-
def time_frame_from_ndarray(self):
23-
DataFrame(self.arr)
24-
25-
def time_series_from_ndarray(self):
26-
Series(self.data, index=self.index)
27-
2844
def time_index_from_array_string(self):
2945
Index(self.arr_str)
3046

47+
def time_index_from_array_floats(self):
48+
Index(self.arr)
49+
3150
def time_dtindex_from_series(self):
3251
DatetimeIndex(self.s)
3352

3453
def time_dtindex_from_index_with_series(self):
3554
Index(self.s)
55+
56+
57+
class MultiIndexConstructor(object):
58+
59+
goal_time = 0.2
60+
61+
def setup(self):
62+
N = 10**4
63+
self.iterables = [tm.makeStringIndex(N), range(20)]
64+
65+
def time_multiindex_from_iterables(self):
66+
MultiIndex.from_product(self.iterables)

asv_bench/benchmarks/frame_ctor.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
try:
55
from pandas.tseries.offsets import Nano, Hour
66
except ImportError:
7-
# For compatability with older versions
7+
# For compatibility with older versions
88
from pandas.core.datetools import * # noqa
99

1010
from .pandas_vb_common import setup # noqa
@@ -81,3 +81,15 @@ def setup(self, nrows):
8181
def time_frame_from_records_generator(self, nrows):
8282
# issue-6700
8383
self.df = DataFrame.from_records(self.gen, nrows=nrows)
84+
85+
86+
class FromNDArray(object):
87+
88+
goal_time = 0.2
89+
90+
def setup(self):
91+
N = 100000
92+
self.data = np.random.randn(N)
93+
94+
def time_frame_from_ndarray(self):
95+
self.df = DataFrame(self.data)

0 commit comments

Comments
 (0)