In NumPy, how will you read CSV data into an array?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
You can use `numpy.genfromtxt()` or `numpy.loadtxt()` to read CSV files into a NumPy array.
```python
import numpy as np
data = np.genfromtxt('file.csv', delimiter=',')
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / glibwaresoftsolutions
You can use `numpy.genfromtxt()` or `numpy.loadtxt()` to read CSV files into a NumPy array.
```python
import numpy as np
data = np.genfromtxt('file.csv', delimiter=',')
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is anagram in python?
What language is python based on?
Explain pickling and unpickling.
Explain global and local variables in python?
What do you understand by mutable and immutable in python?
Explain how to overload constructors (or methods) in Python.
What are the 4 data types in python?
Explain important characteristics of python objects?
Explain how to redirect the output of a python script from standout(ie., A monitor) on to a file?
What does the ord() function do in python?
How do you override a method in python?
What are the built-in types available in python?