Last active
January 20, 2022 21:20
-
-
Save RGGH/32ab96565dc564dd23f0a329aa4d37c3 to your computer and use it in GitHub Desktop.
Import CSV that includes text into Numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
''' numpy gen from text ''' | |
x = np.genfromtxt("t.txt", delimiter=",", dtype='f8,U6') | |
print(x) | |
# Where CSV is : | |
# 1,'moo' | |
# 2,'moo2' | |
# 3,'ZZmoo3' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment