Python: Import the two-tube csv Pandas

Python: Import the two-tube csv Pandas … here is a solution to the problem.

Python: Import the two-tube csv Pandas

I’m using Python 3.7. I’m trying to import a two-pipe separated .txt file into Python using pandas.

My code is as follows:

import pandas as pd
avm_sample = pd.read_csv(_avm_sample_file,sep='|')

I ended up with multiple blank columns due to the double pipe separator.

Is there an easy way to separate files? Or, alternatively, a better way to import data into a Pandas data frame? The file itself is over 1 GB.

Thanks,

Mike

Related Problems and Solutions