Df operation to cut a row based on particular string not working pandas excel

Viewed 41

I am trying to exclude a row that matches a string keyword script runs successfully but not getting the desired result:

dfg = pd.read_csv("C:/Users/t/B.csv")

dfdfd = dfg[df["task"].str.contains("None") == False]

with pd.ExcelWriter('output3.xlsx') as writer:
    dfdfd.to_excel(writer, sheet_name = 'sheet1Scan', index=False)

I am trying to exclude all rows that contains none string, but it doesn't exclude the right rows and the script doesn't show any error.

0 Answers
Related