您可以
read_csv()在一个
StringIO对象上使用:
from io import BytesIOimport requestsr = requests.get('https://docs.google.com/spreadsheet/ccc?key=0Ak1ecr7i0wotdGJmTURJRnZLYlV3M2daNTRubTdwTXc&output=csv')data = r.contentIn [10]: df = pd.read_csv(BytesIO(data), index_col=0,parse_dates=['Quradate'])In [11]: df.head()Out[11]:Cityregion Res_Comm Dothan South_Central-Montgomery-Auburn-Wiregrass-Dothan Residential 10 Foley South_Mobile-Baldwin Residential 12 Birmingham North_Central-Birmingham-Tuscaloosa-Anniston Commercial 38 Brent North_Central-Birmingham-Tuscaloosa-Anniston Residential 44 Athens North_Huntsville-Decatur-Florence Residential mkt_type Quradate National_exp Alabama_exp Sales_exp Rural 2010-01-15 00:00:00 2 2 3 10 Suburban_Urban 2010-01-15 00:00:00 4 4 4 12 Suburban_Urban 2010-01-15 00:00:00 2 2 3 38Rural 2010-01-15 00:00:00 3 3 3 44 Suburban_Urban 2010-01-15 00:00:00 4 5 4 Inventory_exp Price_exp Credit_exp 0 2 33 10 4 43 12 2 23 38 3 32 44 4 44


