Ask Your Question
3

How can the date format of dd/mm/yyyy be set in Pandas?

asked 2023-04-29 20:23:22 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-04-29 20:31:02 +0000

woof gravatar image

The date format of dd/mm/yyyy can be set in Pandas using the command:

pd.to_datetime(date_column, format='%d/%m/%Y')

This command will convert a date column with the format dd/mm/yyyy into a datetime column in Pandas. The format argument specifies the format of the date column. In this case, '%d/%m/%Y' specifies the format as day/month/year.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-04-29 20:23:22 +0000

Seen: 12 times

Last updated: Apr 29 '23