We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dates is converting '05/12/2023, 11:25\u202fam - ', like this while using 12 hrs time pattern with am/pm and than data frame is also showing error
The text was updated successfully, but these errors were encountered:
from datetime import datetime
formatted_dates = []
for date_string in dates: dt_object = datetime.strptime(date_string.strip('[]'), '%d/%m/%y, %I:%M:%S %p') formatted_date = dt_object.strftime('%d/%m/%y, %I:%M:%S %p') formatted_dates.append(formatted_date)
df = pd.DataFrame({'user_message': messages, 'message_date': formatted_dates})
df['message_date'] = pd.to_datetime(df['message_date'], format='%d/%m/%y, %I:%M:%S %p')
Sorry, something went wrong.
from datetime import datetime formatted_dates = [] for date_string in dates: dt_object = datetime.strptime(date_string.strip('[]'), '%d/%m/%y, %I:%M:%S %p') formatted_date = dt_object.strftime('%d/%m/%y, %I:%M:%S %p') formatted_dates.append(formatted_date) df = pd.DataFrame({'user_message': messages, 'message_date': formatted_dates}) df['message_date'] = pd.to_datetime(df['message_date'], format='%d/%m/%y, %I:%M:%S %p')
solve hua ??
No branches or pull requests
dates is converting '05/12/2023, 11:25\u202fam - ', like this while using 12 hrs time pattern with am/pm
and than data frame is also showing error
The text was updated successfully, but these errors were encountered: