Skip to content

Commit 7de1f5b

Browse files
authored
Merge pull request #69 from pandas-dev/master
Sync Fork from Upstream Repo
2 parents 1925516 + 43321fa commit 7de1f5b

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

doc/source/user_guide/merging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ as shown in the following example.
742742
)
743743
ser
744744
745-
result = pd.merge(df, ser.reset_index(), on=['Let', 'Num'])
745+
pd.merge(df, ser.reset_index(), on=['Let', 'Num'])
746746
747747
748748
Here is another example with duplicate join keys in DataFrames:

pandas/core/frame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ def to_string(
758758
header: Union[bool, Sequence[str]] = True,
759759
index: bool = True,
760760
na_rep: str = "NaN",
761-
formatters: Optional[fmt.formatters_type] = None,
762-
float_format: Optional[fmt.float_format_type] = None,
761+
formatters: Optional[fmt.FormattersType] = None,
762+
float_format: Optional[fmt.FloatFormatType] = None,
763763
sparsify: Optional[bool] = None,
764764
index_names: bool = True,
765765
justify: Optional[str] = None,

pandas/core/reshape/merge.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,10 @@ def merge_asof(
320320
direction: str = "backward",
321321
) -> "DataFrame":
322322
"""
323-
Perform an asof merge. This is similar to a left-join except that we
324-
match on nearest key rather than equal keys.
323+
Perform an asof merge.
325324
326-
Both DataFrames must be sorted by the key.
325+
This is similar to a left-join except that we match on nearest
326+
key rather than equal keys. Both DataFrames must be sorted by the key.
327327
328328
For each row in the left DataFrame:
329329

pandas/io/formats/format.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@
8181
if TYPE_CHECKING:
8282
from pandas import Series, DataFrame, Categorical
8383

84-
formatters_type = Union[
84+
FormattersType = Union[
8585
List[Callable], Tuple[Callable, ...], Mapping[Union[str, int], Callable]
8686
]
87-
float_format_type = Union[str, Callable, "EngFormatter"]
87+
FloatFormatType = Union[str, Callable, "EngFormatter"]
8888

8989
common_docstring = """
9090
Parameters
@@ -455,7 +455,7 @@ class TableFormatter:
455455

456456
show_dimensions: Union[bool, str]
457457
is_truncated: bool
458-
formatters: formatters_type
458+
formatters: FormattersType
459459
columns: Index
460460

461461
@property
@@ -548,9 +548,9 @@ def __init__(
548548
header: Union[bool, Sequence[str]] = True,
549549
index: bool = True,
550550
na_rep: str = "NaN",
551-
formatters: Optional[formatters_type] = None,
551+
formatters: Optional[FormattersType] = None,
552552
justify: Optional[str] = None,
553-
float_format: Optional[float_format_type] = None,
553+
float_format: Optional[FloatFormatType] = None,
554554
sparsify: Optional[bool] = None,
555555
index_names: bool = True,
556556
line_width: Optional[int] = None,
@@ -1089,7 +1089,7 @@ def _get_column_name_list(self) -> List[str]:
10891089
def format_array(
10901090
values: Any,
10911091
formatter: Optional[Callable],
1092-
float_format: Optional[float_format_type] = None,
1092+
float_format: Optional[FloatFormatType] = None,
10931093
na_rep: str = "NaN",
10941094
digits: Optional[int] = None,
10951095
space: Optional[Union[str, int]] = None,
@@ -1171,7 +1171,7 @@ def __init__(
11711171
formatter: Optional[Callable] = None,
11721172
na_rep: str = "NaN",
11731173
space: Union[str, int] = 12,
1174-
float_format: Optional[float_format_type] = None,
1174+
float_format: Optional[FloatFormatType] = None,
11751175
justify: str = "right",
11761176
decimal: str = ".",
11771177
quoting: Optional[int] = None,
@@ -1278,7 +1278,7 @@ def __init__(self, *args, **kwargs):
12781278

12791279
def _value_formatter(
12801280
self,
1281-
float_format: Optional[float_format_type] = None,
1281+
float_format: Optional[FloatFormatType] = None,
12821282
threshold: Optional[Union[float, int]] = None,
12831283
) -> Callable:
12841284
"""Returns a function to be applied on each value to format it"""
@@ -1372,7 +1372,7 @@ def format_values_with(float_format):
13721372

13731373
# There is a special default string when we are fixed-width
13741374
# The default is otherwise to use str instead of a formatting string
1375-
float_format: Optional[float_format_type]
1375+
float_format: Optional[FloatFormatType]
13761376
if self.float_format is None:
13771377
if self.fixed_width:
13781378
float_format = partial(

0 commit comments

Comments
 (0)