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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -