Created
May 31, 2020 11:09
-
-
Save Lawrence-Krukrubo/89a13466a4e79863621ce72f611fa9cf to your computer and use it in GitHub Desktop.
Adding code snippets to Loading Different Data Types in Medium
This file contains hidden or 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
# 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