pandas.HDFStore.keys
pandas 3.1.1 · Data ဖတ်ခြင်းနှင့် ထုတ်ယူခြင်း · method
သိမ်းထားတဲ့ object တွေရဲ့ key တွေကို HDF group လမ်းကြောင်းနဲ့အတူ စာရင်းထုတ်ပေးပါတယ်။
ခေါ်သုံးပုံ
HDFStore.keys(include='pandas')ခေါ်သုံးပုံကို စစ်ကြည့်ရန်
လက်ခံတဲ့ parameter တွေကို ဒီကုဒ်နဲ့ စစ်ကြည့်နိုင်ပါတယ်။ လုပ်ဆောင်ချက်ကို စမ်းဖို့ လိုတဲ့ ဖိုင်၊ package သို့မဟုတ် Python ပတ်ဝန်းကျင်ကို ကိုယ့်စက်မှာ ပြင်ဆင်ပါ။
ထည့်သွင်းနိုင်တဲ့ Arguments
| Parameter | ထည့်သွင်းပုံ | လက်ခံတဲ့ တန်ဖိုးနဲ့ သုံးပုံ |
|---|---|---|
include |
ချန်ထားလို့ရတယ် အမည်နဲ့ဖြစ်ဖြစ် အစဉ်အတိုင်းဖြစ်ဖြစ် ထည့်နိုင်တယ် ပုံမှန်တန်ဖိုး 'pandas' |
စာသား (str) ထည့်သွင်းမယ့် data type သို့မဟုတ် field တွေကို သတ်မှတ်ပါတယ်။ |
ပြန်ပေးတဲ့ ရလဒ်
ပြန်ပေးတဲ့ အမျိုးအစားက list ဖြစ်ပါတယ်။
ကိုယ့်စက်မှာ စမ်းကြည့်ရန်
import pandas as pd
from pathlib import Path
from tempfile import TemporaryDirectory
import tables
frame = pd.DataFrame({"units": [2, 5], "price": [4, 3]})
with TemporaryDirectory() as folder:
path = Path(folder) / "demo.h5"
with pd.HDFStore(path, mode="w") as store:
store.put("orders", frame, format="table", data_columns=["units"])
print(store.keys())