7
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pandasを使いエクセルからデータフレームを作る

7
Posted at

こう書きます

import pandas as pd
excel = pd.ExcelFile('xxx.xlsx')
xxx_projects = excel.parse('プロジェクト',index_col="url")
df_xxx= pd.DataFrame(xxx_projects)

補足

3行目について

プロジェクトって名前のシートから url ってカラムをインデックスにして内容を取り込んでる

index_col は別に必須でもないです。
ただ、指定することでインデックスとしての役割を持たせられる感じです。

つまり、url をインデックス行として指定しているという感じです。
もし指定がないと、行が 0 から始まります。

7
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?