|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
3 | 3 | import collections |
4 | | -from datetime import timedelta |
5 | 4 | import functools |
6 | 5 | import gc |
7 | 6 | from io import StringIO |
|
26 | 25 | Union, |
27 | 26 | cast, |
28 | 27 | ) |
29 | | -import warnings |
30 | | -import weakref |
31 | 28 |
|
32 | 29 | import numpy as np |
33 | 30 |
|
| 31 | +import pandas as pd |
| 32 | +import pandas.core.algorithms as algos |
| 33 | +import pandas.core.common as com |
| 34 | +import pandas.core.indexing as indexing |
34 | 35 | from pandas._config import config |
35 | | - |
36 | 36 | from pandas._libs import lib |
37 | 37 | from pandas._libs.tslibs import Tick, Timestamp, to_offset |
38 | 38 | from pandas._typing import ( |
|
53 | 53 | from pandas.compat import set_function_name |
54 | 54 | from pandas.compat._optional import import_optional_dependency |
55 | 55 | from pandas.compat.numpy import function as nv |
56 | | -from pandas.errors import AbstractMethodError, InvalidIndexError |
57 | | -from pandas.util._decorators import ( |
58 | | - doc, |
59 | | - rewrite_axis_style_signature, Appender, |
60 | | -) |
61 | | -from pandas.util._validators import ( |
62 | | - validate_bool_kwarg, |
63 | | - validate_fillna_kwargs, |
64 | | - validate_percentile, |
65 | | -) |
66 | | - |
| 56 | +from pandas.core import missing, nanops |
| 57 | +from pandas.core.base import PandasObject, SelectionMixin |
| 58 | +from pandas.core.construction import create_series_with_explicit_dtype |
67 | 59 | from pandas.core.dtypes.common import ( |
68 | 60 | ensure_int64, |
69 | 61 | ensure_object, |
|
98 | 90 | from pandas.core.indexes.api import Index, MultiIndex, RangeIndex, ensure_index |
99 | 91 | from pandas.core.indexes.datetimes import DatetimeIndex |
100 | 92 | from pandas.core.indexes.period import Period, PeriodIndex |
101 | | -import pandas.core.indexing as indexing |
102 | 93 | from pandas.core.internals import BlockManager |
103 | 94 | from pandas.core.missing import find_valid_index |
104 | 95 | from pandas.core.ops import align_method_FRAME |
@@ -10704,7 +10695,7 @@ def transform(self, func, *args, **kwargs): |
10704 | 10695 |
|
10705 | 10696 | Examples |
10706 | 10697 | -------- |
10707 | | - >>> df = pd.DataFrame({{'A': range(3), 'B': range(1, 4)}}) |
| 10698 | + >>> df = pd.DataFrame(dict(A=range(3), B=range(1, 4))) |
10708 | 10699 | >>> df |
10709 | 10700 | A B |
10710 | 10701 | 0 0 1 |
|
0 commit comments