I have a dataframe with 10000 rows that look like below:
import numpy as np
df=pd.DataFrame(np.array([['facebook', '15',"women tennis"], ['facebook', '20',"men basketball"], ['facebook', '30','club'],
['apple', "10","vice president"], ['apple', "100",'swimming contest']]),columns=['firm','id','text'])
I'd like to save each firm into a separate JSON file. So the json file for Facebook looks like below, with the file name written as "firm.json" (e.g. facebook.json). The same will be for other firms, such as Apple.
Sorry, I am still a beginner to Pandas, is there a way to do so effectively?

