hwang2006 commited on
Commit
4df1c52
1 Parent(s): 39be685

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Load Dataset
2
+
3
+ ```
4
+ from datasets import load_dataset
5
+ from huggingface_hub import hf_hub_url
6
+ import pandas as pd
7
+ from datasets import Dataset
8
+
9
+ data_files = hf_hub_url(repo_id="hwang2006/huggingface-datasets-issues-2024-03-20", filename="datasets-issues-with-comments.jsonl", repo_type="dataset")
10
+ print(data_files)
11
+ # https://huggingface.co/datasets/hwang2006/huggingface-datasets-issues-2024-03-20/resolve/main/datasets-issues-with-comments.jsonl
12
+
13
+ df = pd.read_json(data_files, orient="records", lines=True)
14
+ issues_dataset = Dataset.from_pandas(df)
15
+ issues_dataset
16
+ #Dataset({
17
+ # features: ['url', 'repository_url', 'labels_url', 'comments_url', 'events_url', 'html_url', 'id', 'node_id', 'number', 'title', 'user', 'labels', 'state', 'locked', 'assignee', 'assignees', 'milestone', 'comments', 'created_at', 'updated_at', 'closed_at', 'author_association', 'active_lock_reason', 'body', 'reactions', 'timeline_url', 'performed_via_github_app', 'state_reason', 'draft', 'pull_request', 'is_pull_request'],
18
+ # num_rows: 6707
19
+ #})
20
+
21
+ ```