I have the following results in a variable called results:
data = """
0 a b this is my first file
1 c d this is my second file
2 e f this is my third file
3 g h this is my fourth file
4 i j this is my fifth file
"""
I want to parse the results into a pandas DataFrame. The result I want is
Calling read_csv
| 0 | a | b | this is my first file |
| 1 | c | d | this is my second file |
| 2 | e | f | this is my third file |
Instead, when I called:
read_csv(StringIO(results), delim_whitespace=True), I get :
| 0 | a | b | this | is | my | first | file |
| 1 | c | d | this | is | my | second | file |
| 2 | e | f | this | is | my | third | file |
Is there any way to specify the max number of delimiter while using delim_whitespace ?