-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial commit for reading in json from hdfs * code is in a function and pydoop added to requirements.txt * moved read into main.py * comment out r and d * remove old file
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pandas as pd | ||
|
||
from src.utils.hdfs_mods import hdfs_load_json as read_json | ||
|
||
# TODO: read from config | ||
folder_path = "/dapsen/workspace_zone/mbs-results/" | ||
file_name = "snapshot-202212-002-2156d36b-e61f-42f1-a0f1-61d1f8568b8e.json" | ||
file_path = folder_path + file_name | ||
|
||
snapshot = read_json(file_path) | ||
|
||
contributors = pd.DataFrame(snapshot["contributors"]) | ||
responses = pd.DataFrame(snapshot["responses"]) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ black | |
isort | ||
nbstripout | ||
nbqa | ||
#research_and_development==1.0.0 | ||
pre_commit_hooks | ||
flake8 | ||
pandas==1.1.5 | ||
|