I am trying to read a tab separated txt file using Pandas. The file looks like this:
data file sample
14.38 14.21 0.8951 5.386 3.312 2.462 4.9
Pandas read_csv is very versatile, you can use it with delim_whitespace = True to handle variable number of whitespaces.
df = pd.read_csv(filename, delim_whitespace=True)
Option 2: Use separator argument
df = pd.read_csv(filename, sep='\t+')