python - how to know when some operation on a dataframe affects the original data or not (so I need to reassign its name)? -
i new pandas
, , find difficult understand whether operations run on dataframe (or series) affect original data, or need reassign name of dataframe modified one.
for instance, know using:
my_list.add('one_more')
will modify my_list
dont need reassign name:
however, if df dataframe:
df.ix[mask,:]=0
will not modify dataframe df
, need type:
df=df.ix[mask,:]=0
is there rule missing allow me know when need reassign variable name or not?
many thanks!
Comments
Post a Comment