-4

I have an excel or text file that have some digits as a data. I want to load it to python and store them in a matrix. what can I do? (my excel file has 3 rows and 20 columns).

1
  • 1
    What problems did you meet after reading one of the many tutorials a simple google search yields? Commented May 1, 2016 at 12:25

1 Answer 1

0

The file should be in some format. Excel files can be exported to csv format, than you can use Python's pandas module, the typical workflow is simple

import pandas as pd

data = pd.read_csv("mycsv.csv")

now data object is pandas.DataFrame object. Basically a 2D array.

Sign up to request clarification or add additional context in comments.

1 Comment

pandas can easily read Excel files directly - pd.read_excel()

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.