Skip to content

Commit bfb2e72

Browse files
authored
Merge pull request #237 from AaltoSciComp/eglerean-patch-1
fixing one error + one repetition
2 parents 7ff84e7 + df25010 commit bfb2e72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

content/pandas.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,11 @@ refer to columns and rows either by number or by their name
129129
:attr:`~pandas.DataFrame.at`, :attr:`~pandas.DataFrame.iat`)::
130130

131131
titanic.loc['Lam, Mr. Ali',"Age"] # select single value by row and column
132-
titanic.loc[:'Lam, Mr. Ali',"Name":"Age"] # slice the dataframe by row and column *names*
132+
titanic.loc[:'Lam, Mr. Ali',"Survived":"Age"] # slice the dataframe by row and column *names*
133133
titanic.iloc[0:2,3:6] # same slice as above by row and column *numbers*
134134

135135
titanic.at['Lam, Mr. Ali',"Age"] = 42 # set single value by row and column *name* (fast)
136136
titanic.at['Lam, Mr. Ali',"Age"] # select single value by row and column *name* (fast)
137-
titanic.at['Lam, Mr. Ali',"Age"] = 42 # set single value by row and column *name* (fast)
138137
titanic.iat[0,5] # select same value by row and column *number* (fast)
139138

140139
titanic["is_passenger"] = True # set a whole column

0 commit comments

Comments
 (0)