I keep getting different attribute errors when trying to run this file in ipython...beginner with pandas so maybe I'm missing something
Code:
from pandas import Series, DataFrame
import pandas as pd
import json
nan=float('NaN')
data = []
with open('file.json') as f:
for line in f:
data.append(json.loads(line))
df = DataFrame(data, columns=['accepted', 'user', 'object', 'response'])
clean = df.replace('NULL', nan)
clean = clean.dropna()
print clean.value_counts()
AttributeError: 'DataFrame' object has no attribute 'value_counts'
Any ideas?