1

This is the code that I am using and it is not working for some reason. Please help me out.

I have created a text file with some data and when I try to use Pandas to read the data it is not working.

dF = pd.read_csv("PandasLongSample.txt", delimiter='/t')
print(dF)

This is the error:

C:\Users\SVISHWANATH\AppData\Local\Continuum\anaconda3\lib\site-packages\ipykernel_launcher.py:1: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
  """Entry point for launching an IPython kernel.

Thanks for the help!

2 Answers 2

3

Use a backslash (\) instead of a slash (/) for the tab delimiter.

dF = pd.read_csv("PandasLongSample.txt", delimiter='\t')
print(dF)
Sign up to request clarification or add additional context in comments.

Comments

0

There is a typo in your code, it should be \t instead of /t

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.