Skip to content

Commit 3b027af

Browse files
committed
CLN: move core/formats.py and core/style.py to formats
1 parent ae5e8fb commit 3b027af

File tree

21 files changed

+27
-26
lines changed

21 files changed

+27
-26
lines changed

pandas/core/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pandas.core.common import isnull, notnull
99
from pandas.core.categorical import Categorical
1010
from pandas.core.groupby import Grouper
11-
from pandas.core.format import set_eng_float_format
11+
from pandas.formats.format import set_eng_float_format
1212
from pandas.core.index import (Index, CategoricalIndex, Int64Index,
1313
RangeIndex, Float64Index, MultiIndex)
1414

pandas/core/config_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from pandas.core.config import (is_int, is_bool, is_text, is_instance_factory,
1616
is_one_of_factory, get_default_val,
1717
is_callable)
18-
from pandas.core.format import detect_console_encoding
18+
from pandas.formats.format import detect_console_encoding
1919

2020
#
2121
# options from the "display" namespace
@@ -110,7 +110,7 @@
110110
The callable should accept a floating point number and return
111111
a string with the desired format of the number. This is used
112112
in some places like SeriesFormatter.
113-
See core.format.EngFormatter for an example.
113+
See formats.format.EngFormatter for an example.
114114
"""
115115

116116
max_colwidth_doc = """

pandas/core/frame.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454

5555
import pandas.core.base as base
5656
import pandas.core.common as com
57-
import pandas.core.format as fmt
5857
import pandas.core.nanops as nanops
5958
import pandas.core.ops as ops
59+
import pandas.formats.format as fmt
6060
import pandas.tools.plotting as gfx
6161

6262
import pandas.lib as lib
@@ -586,9 +586,9 @@ def style(self):
586586
587587
See Also
588588
--------
589-
pandas.core.style.Styler
589+
pandas.formats.style.Styler
590590
"""
591-
from pandas.core.style import Styler
591+
from pandas.formats.style import Styler
592592
return Styler(self)
593593

594594
def iteritems(self):
@@ -1634,7 +1634,7 @@ def info(self, verbose=None, buf=None, max_cols=None, memory_usage=None,
16341634
- If False, never show counts.
16351635
16361636
"""
1637-
from pandas.core.format import _put_lines
1637+
from pandas.formats.format import _put_lines
16381638

16391639
if buf is None: # pragma: no cover
16401640
buf = sys.stdout

pandas/core/internals.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ def to_native_types(self, slicer=None, na_rep='', float_format=None,
14311431
if slicer is not None:
14321432
values = values[:, slicer]
14331433

1434-
from pandas.core.format import FloatArrayFormatter
1434+
from pandas.formats.format import FloatArrayFormatter
14351435
formatter = FloatArrayFormatter(values, na_rep=na_rep,
14361436
float_format=float_format,
14371437
decimal=decimal, quoting=quoting,
@@ -1606,7 +1606,7 @@ def to_native_types(self, slicer=None, na_rep=None, quoting=None,
16061606
imask = (~mask).ravel()
16071607

16081608
# FIXME:
1609-
# should use the core.format.Timedelta64Formatter here
1609+
# should use the formats.format.Timedelta64Formatter here
16101610
# to figure what format to pass to the Timedelta
16111611
# e.g. to not show the decimals say
16121612
rvalues.flat[imask] = np.array([Timedelta(val)._repr_base(format='all')
@@ -2128,7 +2128,7 @@ def to_native_types(self, slicer=None, na_rep=None, date_format=None,
21282128
if slicer is not None:
21292129
values = values[..., slicer]
21302130

2131-
from pandas.core.format import _get_format_datetime64_from_values
2131+
from pandas.formats.format import _get_format_datetime64_from_values
21322132
format = _get_format_datetime64_from_values(values, date_format)
21332133

21342134
result = tslib.format_array_from_datetime(

pandas/core/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848

4949
import pandas.core.common as com
5050
import pandas.core.datetools as datetools
51-
import pandas.core.format as fmt
5251
import pandas.core.nanops as nanops
52+
import pandas.formats.format as fmt
5353
from pandas.util.decorators import Appender, deprecate_kwarg, Substitution
5454

5555
import pandas.lib as lib

pandas/formats/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

pandas/formats/tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)