Pandas version checks
-
[X] I have checked that this issue has not already been reported.
-
[X] I have confirmed this bug exists on the latest version of pandas.
-
[X] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
import io
t=pd.read_csv(io.StringIO('''
1
2
3
-
1
2
3
'''),sep='\n',lineterminator='-',header=None)
Issue Description
The example returns the following error in the new version (1.5.3)
ValueError: Specified \n as separator or delimiter. This forces the python engine which does not accept a line terminator. Hence it is not allowed to use the line terminator as separator.
while it did work fine in the previous one (1.3.5).
Moreover, it works fine if I pass lineterminator='\r' and use the same input saved into a file with Windows terminations.
Expected Behavior
It should parse the input just fine.
Installed Versions
Comment From: phofl
Hi, thanks for your report. The error message is deliberate, this behavior is not supported. We should probably raise on windows as well
Comment From: gsportelli
Since it actually worked on earlier versions, why not restricting the error to the specific case that is not supported? Also some note or deprecation due to the different behaviour between versions might help users.