Skip to content

Commit 461b0fc

Browse files
committed
Merge remote-tracking branch 'upstream/master' into sparsedepr
2 parents 5c59f84 + 4a039c6 commit 461b0fc

Some content is hidden

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

82 files changed

+816
-645
lines changed

asv_bench/benchmarks/algorithms.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from pandas._libs import lib
66

77
import pandas as pd
8-
from pandas.util import testing as tm
8+
9+
from .pandas_vb_common import tm
910

1011
for imp in ["pandas.util", "pandas.tools.hashing"]:
1112
try:

asv_bench/benchmarks/categoricals.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
import pandas as pd
6-
import pandas._testing as tm
6+
7+
from .pandas_vb_common import tm
78

89
try:
910
from pandas.api.types import union_categoricals

asv_bench/benchmarks/ctors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import numpy as np
22

33
from pandas import DatetimeIndex, Index, MultiIndex, Series, Timestamp
4-
import pandas._testing as tm
4+
5+
from .pandas_vb_common import tm
56

67

78
def no_change(arr):

asv_bench/benchmarks/frame_ctor.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, MultiIndex, Series, Timestamp, date_range
4-
import pandas._testing as tm
4+
5+
from .pandas_vb_common import tm
56

67
try:
78
from pandas.tseries.offsets import Nano, Hour

asv_bench/benchmarks/frame_methods.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import numpy as np
55

66
from pandas import DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range
7-
import pandas._testing as tm
7+
8+
from .pandas_vb_common import tm
89

910

1011
class GetNumericData:

asv_bench/benchmarks/gil.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import numpy as np
22

33
from pandas import DataFrame, Series, date_range, factorize, read_csv
4-
import pandas._testing as tm
54
from pandas.core.algorithms import take_1d
65

6+
from .pandas_vb_common import tm
7+
78
try:
89
from pandas import (
910
rolling_median,

asv_bench/benchmarks/groupby.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
date_range,
1414
period_range,
1515
)
16-
import pandas._testing as tm
16+
17+
from .pandas_vb_common import tm
1718

1819
method_blacklist = {
1920
"object": {

asv_bench/benchmarks/index_object.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
Series,
1313
date_range,
1414
)
15-
import pandas._testing as tm
15+
16+
from .pandas_vb_common import tm
1617

1718

1819
class SetOperations:

asv_bench/benchmarks/indexing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
option_context,
1818
period_range,
1919
)
20-
import pandas._testing as tm
20+
21+
from .pandas_vb_common import tm
2122

2223

2324
class NumericSeriesIndexing:

asv_bench/benchmarks/inference.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, Series, to_numeric
4-
import pandas._testing as tm
54

6-
from .pandas_vb_common import lib, numeric_dtypes
5+
from .pandas_vb_common import lib, numeric_dtypes, tm
76

87

98
class NumericInferOps:

asv_bench/benchmarks/io/csv.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
import numpy as np
66

77
from pandas import Categorical, DataFrame, date_range, read_csv, to_datetime
8-
import pandas._testing as tm
98

10-
from ..pandas_vb_common import BaseIO
9+
from ..pandas_vb_common import BaseIO, tm
1110

1211

1312
class ToCSV(BaseIO):

asv_bench/benchmarks/io/excel.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from odf.text import P
77

88
from pandas import DataFrame, ExcelWriter, date_range, read_excel
9-
import pandas._testing as tm
9+
10+
from ..pandas_vb_common import tm
1011

1112

1213
def _generate_dataframe():

asv_bench/benchmarks/io/hdf.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, HDFStore, date_range, read_hdf
4-
import pandas._testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class HDFStoreDataFrame(BaseIO):

asv_bench/benchmarks/io/json.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, concat, date_range, read_json, timedelta_range
4-
import pandas._testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class ReadJSON(BaseIO):

asv_bench/benchmarks/io/pickle.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, date_range, read_pickle
4-
import pandas._testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class Pickle(BaseIO):

asv_bench/benchmarks/io/sql.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from sqlalchemy import create_engine
55

66
from pandas import DataFrame, date_range, read_sql_query, read_sql_table
7-
import pandas._testing as tm
7+
8+
from ..pandas_vb_common import tm
89

910

1011
class SQL:

asv_bench/benchmarks/io/stata.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, date_range, read_stata
4-
import pandas._testing as tm
54

6-
from ..pandas_vb_common import BaseIO
5+
from ..pandas_vb_common import BaseIO, tm
76

87

98
class Stata(BaseIO):

asv_bench/benchmarks/join_merge.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import DataFrame, MultiIndex, Series, concat, date_range, merge, merge_asof
6-
import pandas._testing as tm
6+
7+
from .pandas_vb_common import tm
78

89
try:
910
from pandas import merge_ordered

asv_bench/benchmarks/multiindex_object.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import DataFrame, MultiIndex, RangeIndex, date_range
6-
import pandas._testing as tm
6+
7+
from .pandas_vb_common import tm
78

89

910
class GetLoc:

asv_bench/benchmarks/pandas_vb_common.py

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
except (ImportError, TypeError, ValueError):
1414
pass
1515

16+
# Compatibility import for the testing module
17+
try:
18+
import pandas._testing as tm # noqa
19+
except ImportError:
20+
import pandas.util.testing as tm # noqa
21+
22+
1623
numeric_dtypes = [
1724
np.int64,
1825
np.int32,

asv_bench/benchmarks/reindex.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import numpy as np
22

33
from pandas import DataFrame, Index, MultiIndex, Series, date_range, period_range
4-
import pandas._testing as tm
54

6-
from .pandas_vb_common import lib
5+
from .pandas_vb_common import lib, tm
76

87

98
class Reindex:

asv_bench/benchmarks/series_methods.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import NaT, Series, date_range
6-
import pandas._testing as tm
6+
7+
from .pandas_vb_common import tm
78

89

910
class SeriesConstructor:

asv_bench/benchmarks/strings.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import numpy as np
44

55
from pandas import DataFrame, Series
6-
import pandas._testing as tm
6+
7+
from .pandas_vb_common import tm
78

89

910
class Methods:

doc/source/reference/frame.rst

+2
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ Metadata
273273

274274
:attr:`DataFrame.attrs` is a dictionary for storing global metadata for this DataFrame.
275275

276+
.. warning:: ``DataFrame.attrs`` is considered experimental and may change without warning.
277+
276278
.. autosummary::
277279
:toctree: api/
278280

doc/source/reference/series.rst

+2
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ Metadata
525525

526526
:attr:`Series.attrs` is a dictionary for storing global metadata for this Series.
527527

528+
.. warning:: ``Series.attrs`` is considered experimental and may change without warning.
529+
528530
.. autosummary::
529531
:toctree: api/
530532

doc/source/user_guide/io.rst

+2
Original file line numberDiff line numberDiff line change
@@ -3877,6 +3877,8 @@ specified in the format: ``<float>(<unit>)``, where float may be signed (and fra
38773877
store.append('dftd', dftd, data_columns=True)
38783878
store.select('dftd', "C<'-3.5D'")
38793879
3880+
.. _io.query_multi:
3881+
38803882
Query MultiIndex
38813883
++++++++++++++++
38823884

0 commit comments

Comments
 (0)