0
0

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 3 years have passed since last update.

【業務効率化】フォルダ内のファイルを自動的に合体させる方法~非エンジニアメモ

Last updated at Posted at 2021-10-28

モジュールのインポート

import glob
import os

空のDataFrameを定義

df = pd.DataFrame(columns= [])

.csvを含むファイル全てをpd.read_csv()で読み込む

for i in glob.glob("*.csv"):
    tmp_df = pd.read_csv(i,encoding="cp932",low_memory=False)
    df = pd.concat([df,tmp_df]) # DataFrameを連結する
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?