Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pandas read_csv multiple separator

my_cols = [str(i) for i in range(45)] # create some col names
df_user_key_word_org = pd.read_csv(filepath+"user_key_word.txt",
                                   sep="s+|;|:",
                                   names=my_cols, 
                                   header=None, 
                                   engine="python")
# I tested with s = StringIO(text_from_OP) on my computer
Comment

PREVIOUS NEXT
Code Example
Python :: python invert dictionary 
Python :: pyqt tex 
Python :: How to find the three largest values of an array efficiently, in Python? 
Python :: flask make static directory 
Python :: factorial recursion python 
Python :: convert string representation of a list to list 
Python :: get the system boot time in python 
Python :: python read arguments 
Python :: identify null values 
Python :: Import "flask" could not be resolved 
Python :: pygame.set_volume(2.0) max volume 
Python :: remove after and before space python 
Python :: python compare if 2 files are equal 
Python :: char list to string python 
Python :: random string generator python 
Python :: on member leave event in discord.py 
Python :: plotly hide trace from hover 
Python :: python keyboard press 
Python :: command prompt pause in python 
Python :: Python find max in list of dict by value 
Python :: python merge csv files in same folder 
Python :: time delta python 
Python :: hide password input tkinter 
Python :: discord embed colors python 
Python :: python image plot 
Python :: print the number of times that the substring occurs in the given string 
Python :: how to find second maximum element of an array python 
Python :: get duplicate and remove but keep last in python df 
Python :: matplotlib rc params 
Python :: enumerate in python 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =