DEV Community

MokhtarEbrahim
MokhtarEbrahim

Posted on

NumPy loadtxt tutorial

1 Specifying the file path
2 Specifying delimiters
2.1 Dealing with 2 delimiters
2.2 A general approach for multiple delimiters
3 Specifying the data type
4 Ignoring headers
5 Ignoring the first column
6 Load first n rows
7 Load specific rows
8 Skip the last row
9 Skip specific columns
10 Load 3D arrays
11 Comparison with alternatives
11.1 numpy.genfromtxt
11.2 numpy.fromfile
11.3 pandas.read_csv
12 Handling Missing Values
13 Conclusion

https://likegeeks.com/numpy-loadtxt-tutorial/

Most workarounds for loading data from files in NumPy.
Hope you like it.
Regards,

Top comments (0)