Hi
I have a dataframe with the follwoing columns
How do I update the dataframe.
I tried the following - but this gives a warning about updating a slice
Must be something simple... Any pointers please?
link to settingwithwarning
Nevermind, the link helped and I think it is working as required now :)
I have a dataframe with the follwoing columns
source date host tag adreq adimpr revenue Device deletemeNow some of the rows have things I do not want to see, but I do not want to delete.
How do I update the dataframe.
I tried the following - but this gives a warning about updating a slice
tdf = self.dfDemands[ (self.dfDemands.deleteme == False) & (self.dfDemands.source == 'thesource') & (self.dfDemands.host == 'nameofahost') ] tdf['deleteme'] = True self.dfDemands.update( tdf )Also tried
self.dfDemands['deleteme'] = (self.dfDemands.deleteme == False) & (self.dfDemands.source == 'Source') & (self.dfDemands.host == 'nameofahost')Which although doesn't appear to error - doesn't up date either
Must be something simple... Any pointers please?
link to settingwithwarning
Nevermind, the link helped and I think it is working as required now :)