|
20 | 20 |
|
21 | 21 | # numpy compat
|
22 | 22 | from pandas.compat.numpy import (
|
23 |
| - is_numpy_dev as _is_numpy_dev, |
24 | 23 | np_version_under1p17 as _np_version_under1p17,
|
25 | 24 | np_version_under1p18 as _np_version_under1p18,
|
| 25 | + is_numpy_dev as _is_numpy_dev, |
26 | 26 | )
|
27 | 27 |
|
28 | 28 | try:
|
|
37 | 37 | ) from e
|
38 | 38 |
|
39 | 39 | from pandas._config import (
|
40 |
| - describe_option, |
41 | 40 | get_option,
|
| 41 | + set_option, |
| 42 | + reset_option, |
| 43 | + describe_option, |
42 | 44 | option_context,
|
43 | 45 | options,
|
44 |
| - reset_option, |
45 |
| - set_option, |
46 | 46 | )
|
47 | 47 |
|
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 |
| - |
56 | 48 | # let init-time option registration happen
|
57 | 49 | 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 |
81 | 50 |
|
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 |
97 | 53 | Int8Dtype,
|
98 | 54 | Int16Dtype,
|
99 | 55 | Int32Dtype,
|
100 | 56 | 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, |
117 | 57 | UInt8Dtype,
|
118 | 58 | UInt16Dtype,
|
119 | 59 | UInt32Dtype,
|
120 | 60 | 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, |
127 | 69 | isna,
|
128 | 70 | isnull,
|
129 | 71 | notna,
|
130 | 72 | 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, |
131 | 89 | period_range,
|
132 |
| - set_eng_float_format, |
| 90 | + Timedelta, |
133 | 91 | timedelta_range,
|
134 |
| - to_datetime, |
| 92 | + Timestamp, |
| 93 | + date_range, |
| 94 | + bdate_range, |
| 95 | + Interval, |
| 96 | + interval_range, |
| 97 | + DateOffset, |
| 98 | + # conversion |
135 | 99 | to_numeric,
|
| 100 | + to_datetime, |
136 | 101 | to_timedelta,
|
| 102 | + # misc |
| 103 | + Flags, |
| 104 | + Grouper, |
| 105 | + factorize, |
137 | 106 | unique,
|
138 | 107 | value_counts,
|
| 108 | + NamedAgg, |
| 109 | + array, |
| 110 | + Categorical, |
| 111 | + set_eng_float_format, |
| 112 | + Series, |
| 113 | + DataFrame, |
139 | 114 | )
|
140 | 115 |
|
| 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 |
141 | 122 |
|
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 |
143 | 144 | ExcelFile,
|
144 | 145 | 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 |
145 | 155 | HDFStore,
|
| 156 | + read_hdf, |
| 157 | + # sql |
| 158 | + read_sql, |
| 159 | + read_sql_query, |
| 160 | + read_sql_table, |
| 161 | + # misc |
146 | 162 | read_clipboard,
|
147 |
| - read_csv, |
148 |
| - read_excel, |
| 163 | + read_parquet, |
| 164 | + read_orc, |
149 | 165 | read_feather,
|
150 |
| - read_fwf, |
151 | 166 | read_gbq,
|
152 |
| - read_hdf, |
153 | 167 | read_html,
|
154 | 168 | read_json,
|
155 |
| - read_orc, |
156 |
| - read_parquet, |
157 |
| - read_pickle, |
| 169 | + read_stata, |
158 | 170 | read_sas,
|
159 | 171 | read_spss,
|
160 |
| - read_sql, |
161 |
| - read_sql_query, |
162 |
| - read_sql_table, |
163 |
| - read_stata, |
164 |
| - read_table, |
165 |
| - to_pickle, |
166 | 172 | )
|
167 | 173 |
|
| 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 |
168 | 182 |
|
169 | 183 | v = get_versions()
|
170 | 184 | __version__ = v.get("closest-tag", v["version"])
|
|
0 commit comments