-2

hope you are all doing great; I am in the middle of a small project regarding the analysis of TMDB, the data set is csv file with release_date column following M/D/Y

screenshot for the csv file

when reading the csv file in a jupyter notebook I used tmdb_df = pd.read_csv('tmdb-movies.csv', parse_dates=['release_date']) but the dates are not set correctly some date go to 2070 as pandas do this read a date like 4/5/1970 as 4/5/70. how can I fix something like that? or how should i read the file

screenshot for the csv loaded without parse_dates

same issue when loading the csv with parse_date

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Muhammed
  • 3
  • 1
  • 4
  • Please format this properly. it's hard to read – Ted Brownlow Jan 04 '21 at 21:21
  • **[No Screenshots](https://meta.stackoverflow.com/questions/303812/)** of code or data. Always provide a [mre] with code, **data, errors, current output, and expected output**, as **[formatted text](https://stackoverflow.com/help/formatting)**. If relevant, plot images are okay. Please see [How to ask a good question](https://stackoverflow.com/help/how-to-ask). Provide data with [How to provide a reproducible copy of your DataFrame using `df.head(10).to_clipboard(sep=',')`](https://stackoverflow.com/questions/52413246), then **[edit] your question**, and paste the clipboard into a code block. – Trenton McKinney Jan 04 '21 at 22:29

1 Answers1

0
df['Date'] = df["Date"].dt.strftime("%m/%d/%Y")
Octavian
  • 21
  • 4