how do you convert an int64 to minutes?

You need to use pd.to_timedelta here.

pd.to_timedelta(df['Duration(min)'], unit='min')

0   0 days 00:10:00
1   0 days 00:30:00
2   0 days 00:05:00
3   0 days 00:15:00
4   0 days 00:05:00
Name: Duration(min), dtype: timedelta64[ns]

unit -> ‘m’ / ‘minute’ / ‘min’ / ‘minutes’ / ‘T’ all are shorthand for minutes.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top