Python Forum
IndexError: index out of bounds
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IndexError: index out of bounds
#2
I have replaced:

days = ['mon', 'tues', 'wed', 'thur', 'fri', 'sat', 'sun']
with:
days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
However, I am getting the following ErrorMessage:

Error:
Traceback (most recent call last): File "bikeshare.py", line 238, in <module> main() File "bikeshare.py", line 219, in main trip_duration_stats(df) File "bikeshare.py", line 161, in trip_duration_stats print('Total Travel Time: ', seconds_to_datestamp(df['Trip Duration'].sum())) File "bikeshare.py", line 145, in seconds_to_datestamp seconds = seconds - (days * seconds_in_day) TypeError: ufunc 'subtract' did not contain a loop with signature matching types dtype('<U10') dtype('<U10') dtype('<U10')
Reply


Messages In This Thread
IndexError: index out of bounds - by LeoGER - Sep-05-2019, 12:30 AM
RE: IndexError: index out of bounds - by LeoGER - Sep-05-2019, 12:49 PM
RE: IndexError: index out of bounds - by ThomasL - Sep-05-2019, 12:57 PM
RE: IndexError: index out of bounds - by LeoGER - Sep-05-2019, 02:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  IndexError: invalid index to scalar variable. jyotib2610 3 3,160 Mar-10-2022, 09:55 AM
Last Post: jyotib2610
  IndexError: index 0 is out of bounds for axis 0 with size 0 atomxkai 2 5,544 Mar-03-2021, 08:26 AM
Last Post: atomxkai
  [split] Getting Index Error - list index out of range krishna 2 2,643 Jan-09-2021, 08:29 AM
Last Post: buran
  IndexError: index 0 is out of bounds for axis 0 with size 0 tmhsa 0 5,350 Apr-24-2020, 10:00 AM
Last Post: tmhsa
  Getting Index Error - list index out of range RahulSingh 2 6,191 Feb-03-2020, 07:17 AM
Last Post: RahulSingh
  pandas.read_sas with chunksize: IndexError list index out of range axelle 0 2,620 Jan-28-2020, 09:30 AM
Last Post: axelle
  Can you help me with this error? IndexError: invalid index of a 0-dim tensor. DerBerliner 1 4,214 Feb-28-2019, 05:47 PM
Last Post: Larz60+
  Regarding index out of bounds error and implementing Loop error in backpropagation al geevaprasa 6 8,613 Apr-20-2018, 09:35 AM
Last Post: Larz60+
  Unable to understand reason for error IndexError: tuple index out of range rajat2504 4 54,179 Dec-09-2016, 11:04 AM
Last Post: Kebap

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020