File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments