Skip to content

Commit b739aa0

Browse files
committed
Revert unintentional
1 parent 3c506b3 commit b739aa0

File tree

2 files changed

+105
-91
lines changed

2 files changed

+105
-91
lines changed

pandas/__init__.py

+102-88
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
# numpy compat
2222
from pandas.compat.numpy import (
23-
is_numpy_dev as _is_numpy_dev,
2423
np_version_under1p17 as _np_version_under1p17,
2524
np_version_under1p18 as _np_version_under1p18,
25+
is_numpy_dev as _is_numpy_dev,
2626
)
2727

2828
try:
@@ -37,134 +37,148 @@
3737
) from e
3838

3939
from pandas._config import (
40-
describe_option,
4140
get_option,
41+
set_option,
42+
reset_option,
43+
describe_option,
4244
option_context,
4345
options,
44-
reset_option,
45-
set_option,
4646
)
4747

48-
from pandas.util._print_versions import show_versions
49-
from pandas.util._tester import test
50-
51-
import pandas.api
52-
import pandas.arrays
53-
from pandas.core.arrays.sparse import SparseDtype
54-
from pandas.core.computation.api import eval
55-
5648
# let init-time option registration happen
5749
import pandas.core.config_init
58-
from pandas.core.reshape.api import (
59-
concat,
60-
crosstab,
61-
cut,
62-
get_dummies,
63-
lreshape,
64-
melt,
65-
merge,
66-
merge_asof,
67-
merge_ordered,
68-
pivot,
69-
pivot_table,
70-
qcut,
71-
wide_to_long,
72-
)
73-
import pandas.testing
74-
75-
from pandas.io.json import _json_normalize as json_normalize
76-
from pandas.tseries import offsets
77-
from pandas.tseries.api import infer_freq
78-
79-
# use the closest tagged version if possible
80-
from ._version import get_versions
8150

82-
from pandas.core.api import ( # dtype; missing; indexes; tseries; conversion; misc
83-
NA,
84-
BooleanDtype,
85-
Categorical,
86-
CategoricalDtype,
87-
CategoricalIndex,
88-
DataFrame,
89-
DateOffset,
90-
DatetimeIndex,
91-
DatetimeTZDtype,
92-
Flags,
93-
Float64Index,
94-
Grouper,
95-
Index,
96-
IndexSlice,
51+
from pandas.core.api import (
52+
# dtype
9753
Int8Dtype,
9854
Int16Dtype,
9955
Int32Dtype,
10056
Int64Dtype,
101-
Int64Index,
102-
Interval,
103-
IntervalDtype,
104-
IntervalIndex,
105-
MultiIndex,
106-
NamedAgg,
107-
NaT,
108-
Period,
109-
PeriodDtype,
110-
PeriodIndex,
111-
RangeIndex,
112-
Series,
113-
StringDtype,
114-
Timedelta,
115-
TimedeltaIndex,
116-
Timestamp,
11757
UInt8Dtype,
11858
UInt16Dtype,
11959
UInt32Dtype,
12060
UInt64Dtype,
121-
UInt64Index,
122-
array,
123-
bdate_range,
124-
date_range,
125-
factorize,
126-
interval_range,
61+
CategoricalDtype,
62+
PeriodDtype,
63+
IntervalDtype,
64+
DatetimeTZDtype,
65+
StringDtype,
66+
BooleanDtype,
67+
# missing
68+
NA,
12769
isna,
12870
isnull,
12971
notna,
13072
notnull,
73+
# indexes
74+
Index,
75+
CategoricalIndex,
76+
Int64Index,
77+
UInt64Index,
78+
RangeIndex,
79+
Float64Index,
80+
MultiIndex,
81+
IntervalIndex,
82+
TimedeltaIndex,
83+
DatetimeIndex,
84+
PeriodIndex,
85+
IndexSlice,
86+
# tseries
87+
NaT,
88+
Period,
13189
period_range,
132-
set_eng_float_format,
90+
Timedelta,
13391
timedelta_range,
134-
to_datetime,
92+
Timestamp,
93+
date_range,
94+
bdate_range,
95+
Interval,
96+
interval_range,
97+
DateOffset,
98+
# conversion
13599
to_numeric,
100+
to_datetime,
136101
to_timedelta,
102+
# misc
103+
Flags,
104+
Grouper,
105+
factorize,
137106
unique,
138107
value_counts,
108+
NamedAgg,
109+
array,
110+
Categorical,
111+
set_eng_float_format,
112+
Series,
113+
DataFrame,
139114
)
140115

116+
from pandas.core.arrays.sparse import SparseDtype
117+
118+
from pandas.tseries.api import infer_freq
119+
from pandas.tseries import offsets
120+
121+
from pandas.core.computation.api import eval
141122

142-
from pandas.io.api import ( # excel; parsers; pickle; pytables; sql; misc
123+
from pandas.core.reshape.api import (
124+
concat,
125+
lreshape,
126+
melt,
127+
wide_to_long,
128+
merge,
129+
merge_asof,
130+
merge_ordered,
131+
crosstab,
132+
pivot,
133+
pivot_table,
134+
get_dummies,
135+
cut,
136+
qcut,
137+
)
138+
139+
import pandas.api
140+
from pandas.util._print_versions import show_versions
141+
142+
from pandas.io.api import (
143+
# excel
143144
ExcelFile,
144145
ExcelWriter,
146+
read_excel,
147+
# parsers
148+
read_csv,
149+
read_fwf,
150+
read_table,
151+
# pickle
152+
read_pickle,
153+
to_pickle,
154+
# pytables
145155
HDFStore,
156+
read_hdf,
157+
# sql
158+
read_sql,
159+
read_sql_query,
160+
read_sql_table,
161+
# misc
146162
read_clipboard,
147-
read_csv,
148-
read_excel,
163+
read_parquet,
164+
read_orc,
149165
read_feather,
150-
read_fwf,
151166
read_gbq,
152-
read_hdf,
153167
read_html,
154168
read_json,
155-
read_orc,
156-
read_parquet,
157-
read_pickle,
169+
read_stata,
158170
read_sas,
159171
read_spss,
160-
read_sql,
161-
read_sql_query,
162-
read_sql_table,
163-
read_stata,
164-
read_table,
165-
to_pickle,
166172
)
167173

174+
from pandas.io.json import _json_normalize as json_normalize
175+
176+
from pandas.util._tester import test
177+
import pandas.testing
178+
import pandas.arrays
179+
180+
# use the closest tagged version if possible
181+
from ._version import get_versions
168182

169183
v = get_versions()
170184
__version__ = v.get("closest-tag", v["version"])

pandas/tests/api/test_api.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ class TestPDApi(Base):
189189
"_hashtable",
190190
"_lib",
191191
"_libs",
192-
"np_version_under1p17",
193-
"np_version_under1p18",
194-
"is_numpy_dev",
192+
"_np_version_under1p17",
193+
"_np_version_under1p18",
194+
"_is_numpy_dev",
195195
"_testing",
196196
"_tslib",
197197
"_typing",

0 commit comments

Comments
 (0)