In NumPy, how will you read CSV data into an array?

Answers were Sorted based on User's Feedback



In NumPy, how will you read CSV data into an array?..

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

In NumPy, how will you read CSV data into an array?..

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

Post New Answer

More Python Interview Questions

What is the length of your largest python code? Can you please describe the project?

0 Answers  


Write a small code to explain repr() in python ?

0 Answers  


How many items are in a list python?

0 Answers  


What is the best code you can write to swap two numbers?

0 Answers  


How do we make forms in python?

0 Answers  


Which the command you use to exit help window in python?

0 Answers  


Mention five benefits of using python?

0 Answers  


Is java or python better?

0 Answers  


Is python faster than c#?

0 Answers  


What is the function of a negative index?

0 Answers  


What is the difference between del() and remove() methods of the list?

0 Answers  


How do you count in python?

0 Answers  


Categories