Created
April 21, 2021 13:58
-
-
Save tetlabo/daf433978bc4bae6a6ec2b1cb31ba299 to your computer and use it in GitHub Desktop.
AmbientWeather.netからデータを取得し、Pandasデータフレームに格納する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ambient_api.ambientapi import AmbientAPI | |
import time | |
import pandas as pd | |
api = AmbientAPI(AMBIENT_API_KEY='your-key-here',AMBIENT_APPLICATION_KEY='your-key-here') | |
devices = api.get_devices() | |
device = devices[0] | |
time.sleep(1) # APIの制限を回避するため、1秒待つ | |
# データを取得し、Pandasデータフレームに格納する | |
df = pd.DataFrame.from_dict(device.get_data()) | |
df.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment