'How to remove delimiter column in the pandas dataframe
I have the following dataset in .csv file
when i read the file i get something like this
df = pd.read_csv("xxx.csv",dtype = str ,header = None, encoding='utf-8')
df.head()
0 1 2 3 4 5 6
63 | ssd | 23 | 4kj
63 | ssd | 30 | 4rc
63 | ssd | 900 | 4rt
63 | ssd | 100 | Bqa
63 | ssd | 140 | 8er
63 | ssd | 10 | 8df
63 | ssd | 40 | Bfr
As in the above dataframe 0,1,2,3,4,5,6. when i read the XXX.csv file i just need the column with the information i don't want the column with the delimiter.
expected output
0 1 2 3
63 ssd 23 4kj
63 ssd 30 4rc
63 ssd 900 4rt
63 ssd 100 Bqa
63 ssd 140 8er
63 ssd 10 8df
63 ssd 40 Bfr
How can i get this while reading XXX.csv file
I don't want to use df = df.drop('column_name', 1) as my data will be dynamic.
I want to get rid of delimiter column while reading XXX.csv file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
