Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Python drop duplicated pairs only

New member
Joined
Feb 7, 2023
Messages
21
If I have a dataframe like this:

Code:
Time                        X     Y
2023-02-01T15:03:02.565333  200   10.1
2023-02-01T15:03:02.565333  200   10.1
2023-02-01T15:03:02.565333  200   10.1
2023-02-01T15:03:02.565333  200   10.1
2023-02-01T15:03:02.634508  200   10.1
2023-02-01T15:03:02.634508  200   10.1
2023-02-01T15:03:02.943522  200   10.1
2023-02-01T15:03:02.943522  200   10.1

I would like to remove duplicated PAIRS only. i.e. The first pair and second pair of .565333 timestamps are actually unique, but doing something like t[~t.duplicated()] will remove all the duplicates like this:

Code:
2023-02-01T15:03:02.565333  200   10.1
2023-02-01T15:03:02.634508  200   10.1
2023-02-01T15:03:02.943522  200   10.1

whereas instead I want this:

Code:
2023-02-01T15:03:02.565333  200   10.1
2023-02-01T15:03:02.565333  200   10.1
2023-02-01T15:03:02.634508  200   10.1
2023-02-01T15:03:02.943522  200   10.1
 
New member
Joined
Feb 9, 2023
Messages
4
MenuItem takes an onClick handler, which it calls when it detects a click on itself or it's children.
The fact that your error is undefined is not a function indicates that somewhere there is code that is calling a passed in parameter expecting it to be a function, and in reality nothing was passed in.
I see that in your code example, you have a number of MenuItem elements with no onClick callbacks:
<MenuItem></MenuItem>

Which suggests to me that there is the root of your problem. I'd try adding a callback, even a noop like () => {} and see if it fixes the problem.
 
Top