I'm looking for a way to post a csv file directly from a pandas data frame without the need of saving it in a local file, and then posting it.
In my case, the URL is a service listening to my request that requires a scv
Is there a way to have a url as an argument into a df.to_csv(url) that will post it directly?
I tried the following: (got bad response )
import requests
agg_data=pd.read_csv('some_csv.csv')
r = requests.post('http://crystal-ball-some_url', data ={'agg_data':agg_data.to_csv()})
print (r)
<Response [400]>