Update README.md
Browse files
README.md
CHANGED
@@ -11,13 +11,31 @@ size_categories:
|
|
11 |
|
12 |
## Usage
|
13 |
```python
|
|
|
|
|
|
|
14 |
# Hugging Face Datasets 形式で読み込み
|
15 |
-
data = load_dataset(
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
#
|
19 |
-
df = pd.read_csv(
|
20 |
-
|
|
|
|
|
21 |
```
|
22 |
|
23 |
## Reference
|
|
|
11 |
|
12 |
## Usage
|
13 |
```python
|
14 |
+
import pandas as pd
|
15 |
+
from datasets import load_dataset
|
16 |
+
|
17 |
# Hugging Face Datasets 形式で読み込み
|
18 |
+
data = load_dataset(
|
19 |
+
"Prgckwb/shokujin-menu",
|
20 |
+
split="train"
|
21 |
+
)
|
22 |
+
print(data[0])
|
23 |
+
# {
|
24 |
+
# 'id': 1,
|
25 |
+
# 'name': '麻婆豆腐',
|
26 |
+
# 'price': 650,
|
27 |
+
# 'category': '定食',
|
28 |
+
# 'day_start': None,
|
29 |
+
# 'day_end': None,
|
30 |
+
# 'can_weekday': None,
|
31 |
+
# 'description': '1番'
|
32 |
+
# }
|
33 |
|
34 |
+
# DataFrame 形式で読み込み
|
35 |
+
df = pd.read_csv(
|
36 |
+
"https://huggingface.co/datasets/Prgckwb/shokujin-menu/raw/main/shokujin.csv"
|
37 |
+
)
|
38 |
+
print(df.head())
|
39 |
```
|
40 |
|
41 |
## Reference
|