Python Forum
[Numpy] How to store different data type in one numpy array?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Numpy] How to store different data type in one numpy array?
#1
I want to store different data type in on numpy array,
b = np.array([['2024-03-22', 71.0, 'ceh'], ['2024-03-23', 63.0, 'abc']])
and specific dtype likes:
[['datetime64[D]', 'float64', 'string'], ['datetime64[D]', 'float64', 'string']]
how to define that?
Reply


Messages In This Thread
[Numpy] How to store different data type in one numpy array? - by water - Mar-23-2024, 08:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: '>' not supported between instances of 'numpy.str_' and 'int' Anouar 0 224 Apr-26-2024, 09:34 AM
Last Post: Anouar
  Bitwise Operations in numpy Sowmya 3 404 Apr-03-2024, 02:51 PM
Last Post: deanhystad
  [Numpy] Load date/time from .txt to 'datetime64' type. water 4 784 Mar-01-2024, 11:16 PM
Last Post: Gribouillis
  numpy.ufunc - Arguments missunderstand MarioBruza 0 879 Jan-11-2023, 05:03 AM
Last Post: MarioBruza
  reshaping 2D numpy array paul18fr 3 1,066 Jan-03-2023, 06:45 PM
Last Post: paul18fr
  Pandas dataframes and numpy arrays bytecrunch 1 1,378 Oct-11-2022, 08:08 PM
Last Post: Larz60+
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,706 Jul-19-2022, 06:31 AM
Last Post: paul18fr
Question about Numpy indexing. water 1 1,504 Jan-18-2022, 09:52 PM
Last Post: paul18fr
  numpy masking/filtering nilamo 3 3,589 Dec-04-2021, 10:28 PM
Last Post: nilamo
  Data Science - "key of type tuple not found and not a MultiIndex" priyanshuaggarwal 0 5,334 Nov-07-2021, 11:22 PM
Last Post: priyanshuaggarwal

Forum Jump:

User Panel Messages

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