In pandas have a dataframe:
df1 = pd.DataFrame({'Type':['Application','Application','Hardware'],
'Category': ['None','None','Hardware']})
I have the following index to retrieve rows where type contains "application" and Category contains 'None'.
df1[df1['Type'].str.contains('Application') & df1['Category'].str.contains('None')]
Category Type
0 None Application
1 None Application
I would like to update the column Category such that the value is 'some new value' for each row.
I have also tried the same with the following loc index with no success
df1[df1.loc[:,'Type'].str.contains('Application') \
& df1.loc[:,'Category'].str.contains('None')]
None.