df= pd.read_csv("3.csv")
df=df.loc((df['column 1'] != "abc") & df['column 2'] == "def" ) # return a series by using boolean find
assume df will got 10 rows so now df will be maybe selected 5 from orignal df. Then example data maybe
#example value as table format
<> column 1 column 2 column3
0 abc def z
1 abc def s #original maybe 3
2 abc def q #ori 7
3 abc def 2 #8
4 abc def l #9
Are there any way to maintain the original index value? Because I want to update the orignal dataframe with the selected value. Tried something like df.index but it is the latest index