Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
numpy dtype anomaly
#4
According to the documentation, the usecols parameter does this:

Quote:usecols : int or sequence, optional

Which columns to read, with 0 being the first. For example, usecols = (1,4,5) will extract the 2nd, 5th and 6th columns. The default, None, results in all columns being read.

So, you're telling it to use column 0 and column 2 only but your dtype has four columns listed. Have you tried usecols with the same number of columns as the dtype?
Reply


Messages In This Thread
numpy dtype anomaly - by bluefrog - Nov-05-2018, 09:09 PM
RE: numpy dtype anomaly - by stullis - Nov-06-2018, 12:29 AM
RE: numpy dtype anomaly - by bluefrog - Nov-07-2018, 12:00 AM
RE: numpy dtype anomaly - by stullis - Nov-07-2018, 12:14 AM
RE: numpy dtype anomaly - by bluefrog - Nov-07-2018, 12:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] How to store different data type in one numpy array? water 7 707 Mar-26-2024, 02:18 PM
Last Post: snippsat
  FutureWarning: Logical ops (and, or, xor) between Pandas objects and dtype-less seque NewBiee 5 1,687 Sep-12-2023, 03:15 PM
Last Post: deanhystad
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,675 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  Data dtype error according to the rule "safe" AndreasMavro 5 9,252 Feb-27-2020, 10:46 PM
Last Post: Pama
  dtype in not working in mad() function ift38375 8 4,048 Jul-22-2019, 02:53 AM
Last Post: scidam
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 3,030 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  ValueError: Input contains infinity or a value too large for dtype('float64') Rabah_r 1 12,946 Apr-06-2019, 11:08 AM
Last Post: scidam

Forum Jump:

User Panel Messages

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