text_plain_output_1.png
import glob

import pandas as pd

import pandas as pd

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

os.chdir('/kaggle/working')

output_dir = './data'
if not os.path.isdir(output_dir):
    os.mkdir(output_dir)
os.mkdir('./data/nocall')

path_to_json = '../input/freefield1010/freefield1010/*/*'
json_pattern = os.path.join(path_to_json, '*.json')
file_list = glob.glob(json_pattern)

import pandas as pd
dfs = []
for file in file_list:
    with open(file) as f:
        json_data = pd.json_normalize(json.loads(f.read()))
    dfs.append(json_data)
df = pd.concat(dfs, sort=False)

df['hasbird'] = df.apply(lambda x: 'bird' in x['tags'], axis=1).astype(int)
train_ff1010 = df.sort_values(by='id').reset_index(drop=True)
train_ff1010 = train_ff1010[train_ff1010.hasbird == 0].reset_index(drop=True)
train_ff1010.head(2)