0

I want to read a specific line in a csv file in pandas on python.Here on this image I want to read the 19010101 date enter image description here

1 Answer 1

1

You can specify the column you want to use

df=read_csv(yourcsv.csv)
dates = df['DATE'].values.tolist()
print(dates[0])

Bunch of ways to do this, just depends on your requirements. Iloc function might be of use to you too.

Sign up to request clarification or add additional context in comments.

2 Comments

Glad to help! Good luck on your project
Is it possible to specify which line you want to read? eg I want to read 3 line from behind (index = -3)

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.