You are viewing a single comment's thread. Return to all comments →
Parsing the .json file can be tricky, but json is available in Python for exactly this. This is one way that the module can be used:
json
import pandas as pd import json num_lines = int(input()) inputs = [json.loads(input()) for _ in range(num_lines)] test_df = pd.DataFrame(inputs).fillna(0) with open('training.json') as f: data = [json.loads(line) for line in f] data.remove(data[0]) train_df = pd.DataFrame(data).fillna(0)
Other minor points to note when submitting:
Seems like cookies are disabled on this browser, please enable them to open this website
Predict the Missing Grade
You are viewing a single comment's thread. Return to all comments →
Parsing the .json file can be tricky, but
json
is available in Python for exactly this. This is one way that the module can be used:Other minor points to note when submitting: