Convert text data from requests object to dataframe with pandas
<p>Using requests I am creating an object which is in .csv format. How can I then write that object to a DataFrame with pandas?</p>

<p>To get the requests object in text format:</p>

<pre><code>import requests
import pandas as pd
url = r'http://test.url' 
r = requests.get(url)
r.text  #this will return the data as text in csv format
</code></pre>

<p>I tried (doesn't work):</p>

<pre><code>pd.read_csv(r.text)
pd.DataFrame.from_csv(r.text)
</code></pre>

<p>if the url has no authentication then you can directly use read_csv(url)</p>

<p>if you have authentication you can use request to get it un-pickel and print the csv and make sure the result is CSV and use panda.</p>

<p>You can directly use importing 
import csv</p>

python csv pandas dataframe python-requests