File size: 1,180 Bytes
44b7d9c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
730b3fc
 
b95dabe
 
 
730b3fc
b95dabe
 
730b3fc
b95dabe
 
730b3fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
language:
- th
dataset_info:
  features:
    - name: text
      dtype: string
    - name: ข้อความ
      dtype: string
    - name: label
      dtype:
        class_label:
          names:
            '0': neg
            '1': pos
---
### รีวิว sentimental imdb ภาษาไทย
ตั้งต้นจาก https://huggingface.co/datasets/stanfordnlp/imdb

### label
* 0 neg
* 1 pos

* train.csv
* test.csv

### ตัวอย่างการใช้งาน
```
from datasets import load_dataset

# Specify the data files
data_files = {
    "test": "test.csv",
    "train": "train.csv"
}
dataset = load_dataset("uisp/ag_news_th", data_files=data_files)

print("Keys in loaded dataset:", dataset.keys())  # Should show keys for splits, like {'test', 'train'}

# Convert a split to pandas for further processing
test = dataset['test'].to_pandas()
print(test.head())
print(len(test.index))

train = dataset['train'].to_pandas()
train.dropna(inplace=True) # เอาตัวที่ยังไม่ได้แปล (column ข้อความ ว่างเปล่า) ออกไป
print(train.head())
print(len(train.index))```