Mar-15-2020, 04:40 PM
40 for each target? Eww. You can look at them to see how you may want to combine.
In one project I was getting restaurants in Toronto, and Foursquare limits a search result to 50. So, I had to combine a bunch of dataframes so I could get them all. Code is:
That adds the rows of one dataframe to another. You would need to look at the frames to see if you want to add rows or columns as you combine.
In one project I was getting restaurants in Toronto, and Foursquare limits a search result to 50. So, I had to combine a bunch of dataframes so I could get them all. Code is:
#combine the dataframes df_r_comb = array_of_restaurant_frames[0] df_eth = array_of_Eth[0] for frame in array_of_restaurant_frames : df_r_comb = pd.concat([df_r_comb,frame], sort=False) for frame in array_of_Eth : df_eth = pd.concat([df_eth,frame], sort=False) print(df_r_comb.shape) print(df_eth.shape)Two sets of restaurants combined - all, and then Ethiopian (the task of the project was to find where to put a new Ethiopian restaurant)
That adds the rows of one dataframe to another. You would need to look at the frames to see if you want to add rows or columns as you combine.