1

I have a csv file like this:

Date
2020/01/22 16:47:37
2020/01/22 16:47:37
.....

but when I use read_csv function I get

0         Jan 22 16:47:37
1         Jan 22 16:47:37
2         Jan 22 16:47:37

How can I read slash when I use read_csv in pandas?

This is my code

import pandas as pd


data=pd.read_csv(path+file,
                 encoding='utf-8-sig',
                 sep=',')
Martin Gergov
  • 1,556
  • 4
  • 20
  • 29
disney82231
  • 189
  • 1
  • 3
  • 11

1 Answers1

0

Try using

pd.read_csv('filepath',sep='\t') 

instead of sep=' '