Skip to content

Commit 29a9e5d

Browse files
committed
syntax error and linting
1 parent f4d246f commit 29a9e5d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/source/user_guide/merging.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -735,13 +735,15 @@ using :meth:`Series.reset_index`.
735735
736736
# The series has a multi-index with levels corresponding to columns in
737737
# the DataFrame we want to merge with
738-
ser = pd.Series(['a', 'b', 'c', 'd', 'e', 'f'],
739-
index=pd.MultiIndex.from_arrays([["A", "B", "C"] * 2,
740-
[1, 2, 3, 4, 5, 6]], names=['Let', 'Num']))
738+
ser = pd.Series(
739+
['a', 'b', 'c', 'd', 'e', 'f'],
740+
index=pd.MultiIndex.from_arrays([["A", "B", "C"] * 2,
741+
[1, 2, 3, 4, 5, 6]], names=['Let', 'Num'])
742+
)
741743
ser
742744
743745
# Convert the Series to a DataFrame and merge
744-
pd.merge(df, ser.reset_index(), on=['Let', 'Num'])
746+
df2 = pd.merge(df, ser.reset_index(), on=['Let', 'Num'])
745747
type(df2)
746748
747749
# Now we merge the DataFrames

0 commit comments

Comments
 (0)