[PYTHON] Load csv with duplicate columns in pandas

please tell me. I'm trying to read a csv file with pandas. Suppose you have a completely duplicate column name in a csv file, and one of the lines has a value in itImage.png .s3.ap-northeast-1.amazonaws.com/0/426068/7b357270-5a95-83fc-8eb6-2f2f88b6a531.png) If you read it with pandas as it is, it will be "weight", "weight.1". This is a simple example, but in reality there are dozens of duplicate column names, and it is very annoying to read each column name with panndas and then access each column name. Please tell me how to unify these columns into one and create a new data frame. Only one row is listed in a column with the same name.

Recommended Posts

Load csv with duplicate columns in pandas
Load csv with pandas and play with Index
Remove rows with duplicate indexes in pandas DataFrame
Load nested json with pandas
Swap columns in pandas dataframes
[Memo] Load csv of s3 into pandas with boto3
[Python] Read Japanese csv with pandas without garbled characters (and extract columns written in Japanese)
Extract specific multiple columns with pandas
How to read CSV files in Pandas
Adding Series to columns in python pandas
Working with 3D data structures in pandas
Read CSV and analyze with Pandas and Seaborn
How to change multiple columns of csv in Pandas (Unixtime-> Japan Time)
Create "operation log" CSV formatting tool in 5 days with Python Pandas PyInstaller
Load the network modeled with Rhinoceros in Python ③
Read Python csv data with Pandas ⇒ Graph with Matplotlib
Delete rows with arbitrary values in pandas DataFrame
Load the network modeled with Rhinoceros in Python ②
Handle integer types with missing values in Pandas
Csv in python
Add totals to rows and columns in pandas
Load the network modeled with Rhinoceros in Python ①
How to load files in Google Drive with Google Colaboratory
How to access with cache when reading_json in pandas
Read the linked list in csv format with graph-tool
Fill outliers with NaN based on quartiles in Pandas
How to output CSV of multi-line header with pandas
How to convert JSON file to CSV file with Python Pandas
Load the module with the same name in another location
Make a CSV formatting tool with Python Pandas PyInstaller
[Python] A memo to write CSV vertically with Pandas
[Linux] [Python] [Pandas] Load Microsoft Access database (* .mdb) with Pandas
Process csv data with python (count processing using pandas)
Convert numeric variables to categorical with thresholds in pandas
Quickly visualize with Pandas
Learn Pandas in 10 minutes
Processing datasets with pandas (1)
Bootstrap sampling with Pandas
Convert 202003 to 2020-03 with pandas
Processing datasets with pandas (2)
Merge datasets with pandas
Learn Pandas with Cheminformatics
UnicodeDecodeError in pandas read_csv
Read CSV file: pandas
Duplicate combinations in Python
Data visualization with pandas
Data manipulation with Pandas!
Shuffle data with pandas
Csv tinkering with python
LOAD DATA with PyMysql
Create a new csv with pandas based on the local csv
[Python] Open the csv file in the folder specified by pandas
[In one line] Visualize like a lawn with just Pandas
Calculate the time difference between two columns with Pandas DataFrame
Ingenuity to handle data with Pandas in a memory-saving manner
[Python] Plotly draws Pandas dataframes in one shot with Cufflinks
Duplicate the document template prepared in Google Drive with PyDrive2
Convert only date serial numbers in CSV files with awk
How to create dataframes and mess with elements in pandas