Skip to content

Instantly share code, notes, and snippets.

@Lawrence-Krukrubo
Created May 31, 2020 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lawrence-Krukrubo/89a13466a4e79863621ce72f611fa9cf to your computer and use it in GitHub Desktop.
Save Lawrence-Krukrubo/89a13466a4e79863621ce72f611fa9cf to your computer and use it in GitHub Desktop.
Adding code snippets to Loading Different Data Types in Medium
# Let's wrap the import in a try-catch block
try:
data = np.genfromtxt('titanic.csv', delimiter=',', names=True, dtype=None, encoding='utf8')
except Exception as e:
print(type(e))
# Let's see the first five rows of the data ID array
data[:5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment