Say I have the pandas DataFarme looks like this:
    Name  VALUE
0    A      1
1    A      2
2    A      3
3    B      4
4    B      5
5    C      6
6    C      7
7    C      8
8    C      9
9    D     10
I would like to select all the rows with the same name but different values below:
    Name  Value
0    A      1
1    A      2
2    A      3
    Name  Value
0    C      6
1    C      7
2    C      8
3    C      9
I tried to use .T to transform the rows and columns, and then use .groupby to select all columns with the same name. But, there are two questions: firstly, .groupby can not choose the same columns; secondly, .groupby actually adds all values in one row with the same name, which is not the result I want.
Then, I tried to use .duplicated(keep=False), but this code only tells me if the data is the same or not.
What code should I use? Actually. I have a thousand data and more than 20 of the same name rows as "A", "B", "C", "D", up to "Z". Each name has a thousand different values.
 
    