Python Forum
[pandas] TypeError: list indices must be integers or slices, not str but type is int.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[pandas] TypeError: list indices must be integers or slices, not str but type is int.
#5
(Dec-29-2023, 10:39 PM)cspower Wrote: This code show it is an int

1 pprint(type(ix_mg[0][1]))
Try pprint(type(ix_mg[0][0])) . Details matter.
« We can solve any problem by introducing an extra level of indirection »
Reply


Messages In This Thread
RE: [pandas] TypeError: list indices must be integers or slices, not str but type is int. - by Gribouillis - Dec-30-2023, 09:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: unhashable type: 'Series' bongielondympofu 2 674 Mar-14-2024, 06:12 PM
Last Post: deanhystad
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,721 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  New to Pandas. I need help fixing a TypeError kramon19 1 1,845 Dec-30-2020, 02:20 PM
Last Post: snippsat
  Comparing results within a list and appending to pandas dataframe Aryagm 1 2,397 Dec-17-2020, 01:08 PM
Last Post: palladium
  [pandas] How to reshape the list Mekala 6 7,572 Jul-26-2020, 12:49 AM
Last Post: Mekala
  Error Message: TypeError: unhashable type: 'set' twinpiques 4 19,255 May-22-2019, 02:31 PM
Last Post: twinpiques
  Error:unsupported operand type(s) for ** or pow(): 'list' and 'int' mcgrim 3 18,534 Mar-22-2019, 01:29 PM
Last Post: buran
  Inserting data from python list into a pandas dataframe mahmoud899 0 2,660 Mar-02-2019, 04:07 AM
Last Post: mahmoud899
  List and Dictionaries with Pandas Balinor 3 3,052 Aug-20-2018, 10:47 PM
Last Post: ichabod801
  missing pandas even if in conda list metalray 2 3,516 May-29-2018, 12:52 PM
Last Post: metalray

Forum Jump:

User Panel Messages

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