PageRenderTime 27ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 1ms

/pandas/core/api.py

http://github.com/wesm/pandas
Python | 64 lines | 50 code | 10 blank | 4 comment | 0 complexity | 5e8703aa2c5ed30d390f0b4ba609237e MD5 | raw file
Possible License(s): BSD-3-Clause, Apache-2.0
  1. # pylint: disable=W0614,W0401,W0611
  2. # flake8: noqa
  3. import numpy as np
  4. from pandas.core.arrays.integer import (
  5. Int8Dtype,
  6. Int16Dtype,
  7. Int32Dtype,
  8. Int64Dtype,
  9. UInt8Dtype,
  10. UInt16Dtype,
  11. UInt32Dtype,
  12. UInt64Dtype,
  13. )
  14. from pandas.core.algorithms import factorize, unique, value_counts
  15. from pandas.core.dtypes.missing import isna, isnull, notna, notnull
  16. from pandas.core.dtypes.dtypes import (
  17. CategoricalDtype,
  18. PeriodDtype,
  19. IntervalDtype,
  20. DatetimeTZDtype,
  21. )
  22. from pandas.core.arrays import Categorical, array
  23. from pandas.core.groupby import Grouper
  24. from pandas.io.formats.format import set_eng_float_format
  25. from pandas.core.index import (Index, CategoricalIndex, Int64Index,
  26. UInt64Index, RangeIndex, Float64Index,
  27. MultiIndex, IntervalIndex,
  28. TimedeltaIndex, DatetimeIndex,
  29. PeriodIndex, NaT)
  30. from pandas.core.indexes.period import Period, period_range
  31. from pandas.core.indexes.timedeltas import Timedelta, timedelta_range
  32. from pandas.core.indexes.datetimes import Timestamp, date_range, bdate_range
  33. from pandas.core.indexes.interval import Interval, interval_range
  34. from pandas.core.series import Series
  35. from pandas.core.frame import DataFrame
  36. from pandas.core.panel import Panel
  37. # TODO: Remove import when statsmodels updates #18264
  38. from pandas.core.reshape.reshape import get_dummies
  39. from pandas.core.indexing import IndexSlice
  40. from pandas.core.tools.numeric import to_numeric
  41. from pandas.tseries.offsets import DateOffset
  42. from pandas.core.tools.datetimes import to_datetime
  43. from pandas.core.tools.timedeltas import to_timedelta
  44. from pandas.core.config import (get_option, set_option, reset_option,
  45. describe_option, option_context, options)
  46. # Deprecation: xref gh-16747
  47. class TimeGrouper(object):
  48. def __new__(cls, *args, **kwargs):
  49. from pandas.core.resample import TimeGrouper
  50. import warnings
  51. warnings.warn("pd.TimeGrouper is deprecated and will be removed; "
  52. "Please use pd.Grouper(freq=...)",
  53. FutureWarning, stacklevel=2)
  54. return TimeGrouper(*args, **kwargs)