Skip to content

Commit ceac008

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into tslibs-parsing
2 parents d1765ab + 7e4e8ac commit ceac008

Some content is hidden

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

91 files changed

+1667
-1060
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ include LICENSE
33
include RELEASE.md
44
include README.rst
55
include setup.py
6+
include pyproject.toml
67

78
graft doc
89
prune doc/build

asv_bench/benchmarks/period.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22
from pandas import Series, Period, PeriodIndex, date_range
33

44

5+
class PeriodProperties(object):
6+
def setup(self):
7+
self.per = Period('2012-06-01', freq='M')
8+
9+
def time_year(self):
10+
self.per.year
11+
12+
def time_month(self):
13+
self.per.month
14+
15+
def time_quarter(self):
16+
self.per.quarter
17+
18+
def time_day(self):
19+
self.per.day
20+
21+
def time_hour(self):
22+
self.per.hour
23+
24+
def time_minute(self):
25+
self.per.second
26+
27+
def time_second(self):
28+
self.per.second
29+
30+
def time_leap_year(self):
31+
self.per.is_leapyear
32+
33+
534
class Constructor(object):
635
goal_time = 0.2
736

asv_bench/benchmarks/timestamp.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
from .pandas_vb_common import *
2+
from pandas import to_timedelta, Timestamp
3+
4+
5+
class TimestampProperties(object):
6+
goal_time = 0.2
7+
8+
def setup(self):
9+
self.ts = Timestamp('2017-08-25 08:16:14')
10+
11+
def time_tz(self):
12+
self.ts.tz
13+
14+
def time_offset(self):
15+
self.ts.offset
16+
17+
def time_dayofweek(self):
18+
self.ts.dayofweek
19+
20+
def time_weekday_name(self):
21+
self.ts.weekday_name
22+
23+
def time_dayofyear(self):
24+
self.ts.dayofyear
25+
26+
def time_week(self):
27+
self.ts.week
28+
29+
def time_quarter(self):
30+
self.ts.quarter
31+
32+
def time_days_in_month(self):
33+
self.ts.days_in_month
34+
35+
def time_freqstr(self):
36+
self.ts.freqstr
37+
38+
def time_is_month_start(self):
39+
self.ts.is_month_start
40+
41+
def time_is_month_end(self):
42+
self.ts.is_month_end
43+
44+
def time_is_quarter_start(self):
45+
self.ts.is_quarter_start
46+
47+
def time_is_quarter_end(self):
48+
self.ts.is_quarter_end
49+
50+
def time_is_year_start(self):
51+
self.ts.is_quarter_end
52+
53+
def time_is_year_end(self):
54+
self.ts.is_quarter_end
55+
56+
def time_is_leap_year(self):
57+
self.ts.is_quarter_end
58+
59+
def time_microsecond(self):
60+
self.ts.microsecond

ci/requirements-3.5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ echo "install 35"
88
conda remove -n pandas python-dateutil --force
99
pip install python-dateutil
1010

11-
conda install -n pandas -c conda-forge feather-format pyarrow=0.4.1
11+
conda install -n pandas -c conda-forge feather-format pyarrow=0.5.0

doc/source/10min.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ the quarter end:
655655
Categoricals
656656
------------
657657

658-
Since version 0.15, pandas can include categorical data in a ``DataFrame``. For full docs, see the
658+
pandas can include categorical data in a ``DataFrame``. For full docs, see the
659659
:ref:`categorical introduction <categorical>` and the :ref:`API documentation <api.categorical>`.
660660

661661
.. ipython:: python

doc/source/advanced.rst

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ See the :ref:`Indexing and Selecting Data <indexing>` for general indexing docum
2626
should be avoided. See :ref:`Returning a View versus Copy
2727
<indexing.view_versus_copy>`
2828

29-
.. warning::
30-
31-
In 0.15.0 ``Index`` has internally been refactored to no longer sub-class ``ndarray``
32-
but instead subclass ``PandasObject``, similarly to the rest of the pandas objects. This should be
33-
a transparent change with only very limited API implications (See the :ref:`Internal Refactoring <whatsnew_0150.refactoring>`)
34-
3529
See the :ref:`cookbook<cookbook.selection>` for some advanced strategies
3630

3731
.. _advanced.hierarchical:
@@ -270,9 +264,6 @@ Passing a list of labels or tuples works similar to reindexing:
270264
Using slicers
271265
~~~~~~~~~~~~~
272266

273-
.. versionadded:: 0.14.0
274-
275-
In 0.14.0 we added a new way to slice multi-indexed objects.
276267
You can slice a multi-index by providing multiple indexers.
277268

278269
You can provide any of the selectors as if you are indexing by label, see :ref:`Selection by Label <indexing.label>`,
@@ -384,7 +375,7 @@ selecting data at a particular level of a MultiIndex easier.
384375
385376
.. ipython:: python
386377
387-
# using the slicers (new in 0.14.0)
378+
# using the slicers
388379
df.loc[(slice(None),'one'),:]
389380
390381
You can also select on the columns with :meth:`~pandas.MultiIndex.xs`, by
@@ -397,7 +388,7 @@ providing the axis argument
397388
398389
.. ipython:: python
399390
400-
# using the slicers (new in 0.14.0)
391+
# using the slicers
401392
df.loc[:,(slice(None),'one')]
402393
403394
:meth:`~pandas.MultiIndex.xs` also allows selection with multiple keys
@@ -408,11 +399,9 @@ providing the axis argument
408399
409400
.. ipython:: python
410401
411-
# using the slicers (new in 0.14.0)
402+
# using the slicers
412403
df.loc[:,('bar','one')]
413404
414-
.. versionadded:: 0.13.0
415-
416405
You can pass ``drop_level=False`` to :meth:`~pandas.MultiIndex.xs` to retain
417406
the level that was selected
418407

@@ -643,12 +632,9 @@ In the following sub-sections we will highlite some other index types.
643632
CategoricalIndex
644633
~~~~~~~~~~~~~~~~
645634

646-
.. versionadded:: 0.16.1
647-
648-
We introduce a ``CategoricalIndex``, a new type of index object that is useful for supporting
649-
indexing with duplicates. This is a container around a ``Categorical`` (introduced in v0.15.0)
650-
and allows efficient indexing and storage of an index with a large number of duplicated elements. Prior to 0.16.1,
651-
setting the index of a ``DataFrame/Series`` with a ``category`` dtype would convert this to regular object-based ``Index``.
635+
``CategoricalIndex`` is a type of index that is useful for supporting
636+
indexing with duplicates. This is a container around a ``Categorical``
637+
and allows efficient indexing and storage of an index with a large number of duplicated elements.
652638

653639
.. ipython:: python
654640
@@ -743,16 +729,6 @@ Prior to 0.18.0, the ``Int64Index`` would provide the default index for all ``ND
743729
Float64Index
744730
~~~~~~~~~~~~
745731
746-
.. note::
747-
748-
As of 0.14.0, ``Float64Index`` is backed by a native ``float64`` dtype
749-
array. Prior to 0.14.0, ``Float64Index`` was backed by an ``object`` dtype
750-
array. Using a ``float64`` dtype in the backend speeds up arithmetic
751-
operations by about 30x and boolean indexing operations on the
752-
``Float64Index`` itself are about 2x as fast.
753-
754-
.. versionadded:: 0.13.0
755-
756732
By default a ``Float64Index`` will be automatically created when passing floating, or mixed-integer-floating values in index creation.
757733
This enables a pure label-based slicing paradigm that makes ``[],ix,loc`` for scalar indexing and slicing work exactly the
758734
same.

0 commit comments

Comments
 (0)