吴裕雄--天生自然 python语言数据分析:开普勒系外行星搜索结果分析
作者:互联网
import pandas as pd
pd.DataFrame({'Yes': [50, 21], 'No': [131, 2]})
pd.DataFrame({'Bob': ['I liked it.', 'It was awful.'], 'Sue': ['Pretty good.', 'Bland.']})
pd.DataFrame({'Bob': ['I liked it.', 'It was awful.'], 'Sue': ['Pretty good.', 'Bland.']}, index=['Product A', 'Product B'])
pd.Series([1, 2, 3, 4, 5])
pd.Series([30, 35, 40], index=['2015 Sales', '2016 Sales', '2017 Sales'], name='Product A')
wine_reviews = pd.read_csv("F:\\kaggleDataSet\\kepler-exoplanet-search-results\\winemag-data-130k-v2.csv")
wine_reviews.shape
wine_reviews.head()
wine_reviews = pd.read_csv("F:\\kaggleDataSet\\kepler-exoplanet-search-results\\winemag-data-130k-v2.csv", index_col=0) wine_reviews.head()
import sqlite3 conn = sqlite3.connect("F:\\kaggleDataSet\\kepler-exoplanet-search-results\\FPA_FOD_20170508.sqlite")
fires = pd.read_sql_query("SELECT * FROM fires", conn)
fires.head()
wine_reviews.head().to_csv("F:\\kaggleDataSet\\kepler-exoplanet-search-results\\wine_reviews.csv")
conn = sqlite3.connect("F:\\kaggleDataSet\\kepler-exoplanet-search-results\\fires.sqlite") fires.head(10).to_sql("fires", conn)
标签:外行星,python,reviews,fires,kepler,pd,csv,吴裕雄,wine 来源: https://www.cnblogs.com/tszr/p/11258369.html