How to get read excel data into an array with python

前端 未结 4 914
误落风尘
误落风尘 2021-01-05 10:06

In the lab that I work in, we process a lot of data produced by a 96 well plate reader. I\'m trying to write a script that will perform a few calculations and output a bar g

4条回答
  •  误落风尘
    2021-01-05 10:15

    This task is super easy in Pandas these days.

    import pandas as pd

    df = pd.read_excel('file_name_here.xlsx', sheet_name='Sheet1')

    or

    df = pd.read_csv('file_name_here.csv')

    This returns a pandas.DataFrame object which is very powerful for performing operations by column, row, over an entire df, or over individual items with iterrows. Not to mention slicing in different ways.

提交回复
热议问题