Answers for "AttributeError: 'datetime.timedelta' object has no attribute 'minutes'"

2

AttributeError: 'Timedelta' object has no attribute 'minutes'

df['minutes'] = df['time'].dt.total_seconds()/60
Posted by: Guest on September-09-2021
0

type object 'datetime.datetime' has no attribute 'timedelta'

# Use either
import datetime
datetime.datetime.timedelta()
# or
from datetime import datetime
datetime.timedelta()
# But do not use (as you currently are):
from datetime import datetime
datetime.datetime.timedelta()
Posted by: Guest on April-19-2021

Code answers related to "AttributeError: 'datetime.timedelta' object has no attribute 'minutes'"

Python Answers by Framework

Browse Popular Code Answers by Language