I have a df,
Sr.No Name Class Data
0 1 Sri 1 sri is a good player
1 '' Sri 2 sri is good in cricket
2 '' Sri 3 sri went out
3 2 Ram 1 Ram is a good player
4 '' Ram 2 sri is good in cricket
5 '' Ram 3 Ram went out
6 3 Sri 1 sri is a good player
7 '' Sri 2 sri is good in cricket
8 '' Sri 3 sri went out
9 4 Sri 1 sri is a good player
10 '' Sri 2 sri is good in cricket
11 '' Sri 3 sri went out
12 '' Sri 4 sri came back
I am trying to drop duplicates based on ["Name","Class","Data"]. The goal is to drop duplicates based on all sentences per Sr No.
My expected output is,
out_df
Sr.No Name Class Data
0 1 Sri 1 sri is a good player
1 Sri 2 sri is good in cricket
2 Sri 3 sri went out
3 2 Ram 1 Ram is a good player
4 Ram 2 sri is good in cricket
5 Ram 3 Ram went out
9 4 Sri 1 sri is a good player
10 Sri 2 sri is good in cricket
11 Sri 3 sri went out
12 Sri 4 sri came back
df.to_dict()and paste the output in your question? Your dataframes are so difficult to copy.df.to_dict()pls checkpd.DataFrame(my_dict)it gives my actual df properly.