code cell and output cell this is the cell where I want to know if there are duplicates in my dataset however the output cell doesn't expand to show me the full output. I am using jupyter notebook and pandas.
CodePudding user response:
this is not a vscode issue, to track if you have duplicates, you can you a set () object and compare the length of the set with the length of your column, if the length of the set is equal to the length of the column, then there is no duplicates.
otherwise, you can use a Counter object:
from collections import Counter
Counter(df["a"])
which will give you the frequency of each item in your columns
suppose this is your dataframe :
In [8]: df
Out[8]:
a
0 a
1 b
2 b
3 c
4 d
5 e
then applying the above code will give you this result:
Out[9]: Counter({'a': 1, 'b': 2, 'c': 1, 'd': 1, 'e': 1})
which is clearly a method to check duplicates
CodePudding user response:
I found out I can just open the variables tab and choose which variable output I want to fully see in a new tab.