|
20 | 20 | del hard_dependencies, dependency, missing_dependencies
|
21 | 21 |
|
22 | 22 | # numpy compat
|
23 |
| -from pandas.compat.numpy import * |
| 23 | +from pandas.compat.numpy import ( |
| 24 | + _np_version_under1p14, _np_version_under1p15, _np_version_under1p16, |
| 25 | + _np_version_under1p17) |
24 | 26 |
|
25 | 27 | try:
|
26 | 28 | from pandas._libs import (hashtable as _hashtable,
|
|
42 | 44 | # let init-time option registration happen
|
43 | 45 | import pandas.core.config_init
|
44 | 46 |
|
45 |
| -from pandas.core.api import * |
46 |
| -from pandas.core.sparse.api import * |
47 |
| -from pandas.tseries.api import * |
48 |
| -from pandas.core.computation.api import * |
49 |
| -from pandas.core.reshape.api import * |
| 47 | +from pandas.core.api import ( |
| 48 | + # dtype |
| 49 | + Int8Dtype, Int16Dtype, Int32Dtype, Int64Dtype, UInt8Dtype, |
| 50 | + UInt16Dtype, UInt32Dtype, UInt64Dtype, CategoricalDtype, |
| 51 | + PeriodDtype, IntervalDtype, DatetimeTZDtype, |
| 52 | + |
| 53 | + # missing |
| 54 | + isna, isnull, notna, notnull, |
| 55 | + |
| 56 | + # indexes |
| 57 | + Index, CategoricalIndex, Int64Index, UInt64Index, RangeIndex, |
| 58 | + Float64Index, MultiIndex, IntervalIndex, TimedeltaIndex, |
| 59 | + DatetimeIndex, PeriodIndex, IndexSlice, |
| 60 | + |
| 61 | + # tseries |
| 62 | + NaT, Period, period_range, Timedelta, timedelta_range, |
| 63 | + Timestamp, date_range, bdate_range, Interval, interval_range, |
| 64 | + DateOffset, |
| 65 | + |
| 66 | + # conversion |
| 67 | + to_numeric, to_datetime, to_timedelta, |
| 68 | + |
| 69 | + # misc |
| 70 | + np, TimeGrouper, Grouper, factorize, unique, value_counts, |
| 71 | + array, Categorical, set_eng_float_format, Series, DataFrame, |
| 72 | + Panel) |
| 73 | + |
| 74 | +from pandas.core.sparse.api import ( |
| 75 | + SparseArray, SparseDataFrame, SparseSeries, SparseDtype) |
| 76 | + |
| 77 | +from pandas.tseries.api import infer_freq |
| 78 | +from pandas.tseries import offsets |
| 79 | + |
| 80 | +from pandas.core.computation.api import eval |
| 81 | + |
| 82 | +from pandas.core.reshape.api import ( |
| 83 | + concat, lreshape, melt, wide_to_long, merge, merge_asof, |
| 84 | + merge_ordered, crosstab, pivot, pivot_table, get_dummies, |
| 85 | + cut, qcut) |
50 | 86 |
|
51 | 87 | from pandas.util._print_versions import show_versions
|
52 |
| -from pandas.io.api import * |
| 88 | + |
| 89 | +from pandas.io.api import ( |
| 90 | + # excel |
| 91 | + ExcelFile, ExcelWriter, read_excel, |
| 92 | + |
| 93 | + # packers |
| 94 | + read_msgpack, to_msgpack, |
| 95 | + |
| 96 | + # parsers |
| 97 | + read_csv, read_fwf, read_table, |
| 98 | + |
| 99 | + # pickle |
| 100 | + read_pickle, to_pickle, |
| 101 | + |
| 102 | + # pytables |
| 103 | + HDFStore, read_hdf, |
| 104 | + |
| 105 | + # sql |
| 106 | + read_sql, read_sql_query, |
| 107 | + read_sql_table, |
| 108 | + |
| 109 | + # misc |
| 110 | + read_clipboard, read_parquet, read_feather, read_gbq, |
| 111 | + read_html, read_json, read_stata, read_sas) |
| 112 | + |
53 | 113 | from pandas.util._tester import test
|
54 | 114 | import pandas.testing
|
55 | 115 | import pandas.arrays
|
|
0 commit comments