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.

pandasでndjsonを読み込む(ワクチン接種状況オープンデータ)

Posted at

pandasでndjsonを読み込む

大したもんじゃないんですが
こちらでワクチン接種状況に関するデータが公開されていたので

pythonでの読み方みたいなの共有しておこうかと思いまして(・ω・)ノシ
データ形式はndjsonでした。

読む

import json
import pandas as pd

df_pref = pd.read_json('prefecture.ndjson', lines=True)

沖縄県&特定の日付だけで絞り込む

df_pref[(df_pref.prefecture == 47) & (df_pref.date == "2021-07-22")]

csv出力する

df_pref.to_csv("prefecture.csv")

あとは煮るなり焼くなり好きにしてくだせー(`・ω・´)ゞ

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?