Skip to content

Commit 85bab01

Browse files
committed
Whitespace
1 parent 9d9fa24 commit 85bab01

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pandas/core/frame.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -4414,12 +4414,12 @@ def mode(self, axis=0, numeric_only=False):
44144414
"""
44154415
Gets the mode(s) of each element along the axis selected. Empty if nothing
44164416
has 2+ occurrences. Adds a row for each mode per label, fills in gaps
4417-
with nan.
4418-
4417+
with nan.
4418+
44194419
Note that there could be multiple values returned for the selected
4420-
axis (when more than one item share the maximum frequency), which is the
4421-
reason why a dataframe is returned. If you want to impute missing values
4422-
with the mode in a dataframe ``df``, you can just do this:
4420+
axis (when more than one item share the maximum frequency), which is the
4421+
reason why a dataframe is returned. If you want to impute missing values
4422+
with the mode in a dataframe ``df``, you can just do this:
44234423
``df.fillna(df.mode().iloc[0])``
44244424
44254425
Parameters

pandas/tests/test_frame.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -5970,18 +5970,18 @@ def test_boolean_comparison(self):
59705970

59715971
def test_equals_different_blocks(self):
59725972
# GH 9330
5973-
df0 = pd.DataFrame({"A": ["x","y"], "B": [1,2],
5973+
df0 = pd.DataFrame({"A": ["x","y"], "B": [1,2],
59745974
"C": ["w","z"]})
59755975
df1 = df0.reset_index()[["A","B","C"]]
5976-
# this assert verifies that the above operations have
5976+
# this assert verifies that the above operations have
59775977
# induced a block rearrangement
5978-
self.assertTrue(df0._data.blocks[0].dtype !=
5978+
self.assertTrue(df0._data.blocks[0].dtype !=
59795979
df1._data.blocks[0].dtype)
59805980
# do the real tests
59815981
self.assert_frame_equal(df0, df1)
59825982
self.assertTrue(df0.equals(df1))
59835983
self.assertTrue(df1.equals(df0))
5984-
5984+
59855985
def test_to_csv_from_csv(self):
59865986

59875987
pname = '__tmp_to_csv_from_csv__'

0 commit comments

Comments
 (0)