Im trying to work with an excell file using python and pandas. This file has a huge amount of columns and rows, but I will try to simplify using this example:
Name Age Nationality Name1 Age1 Nationality1 Name2 Age2 Nationality2
Jane 32 Canada
Pedro 25 Spain
Lucas 30 Italy
Ana 23 Germany
Pedro 43 Brazil
Lucas 32 Mexico
So, in this example, I have the columns: Name, Age and Nationality. But, I also have Name1, Age1, and Nationality1.. Since I want to filter it by its value, It wouldnt work because I would have to filter each one: Name, Name1 and Name2.
I tought that could be an option converting to different dictionaries and try to filter those dictionaries.. but considering the amount of columns and rows I guess it would take much longer.
I also tought if I coult rename the columns, but I searched and saw that it has to have unique names.. plese correct me if im wrong.
Does anyone have a solution for this? would be very helpful. thanks in advance