Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Try using .loc[row_indexer,col_indexer] = value instead

new_df = df.loc[df.col1>2].copy()
new_df.loc[2, 'new_column'] = 100
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Try
ADD COMMENT
Topic
Name
8+3 =