I have a following JSON file (see link below) that I read from the web. I would like to search for a specific string and return the index of it.
Also, if there is a better way to read and manipulate JSON data other than how I use it here, I would like to know. Thanks!
Here's how I read the file:
import json
import pandas as pd
from pandas import DataFrame, Series
#-------------------------------------------------
# READING IN THE JSON FILE
#-------------------------------------------------
path = 'ads_nasa.txt'
records = [json.loads(line) for line in open(path)]
frame = DataFrame(records)
I tried to use the following but it does not work:
frame.author[0].find('Deshpande, R.')
How do I search for a string and find its index in a Pandas Core Series?