pandas - 案例(美国2012年总统候选人政治献金数据分析)
生活随笔
收集整理的這篇文章主要介紹了
pandas - 案例(美国2012年总统候选人政治献金数据分析)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
# 提供數據months = {'JAN' : 1, 'FEB' : 2, 'MAR' : 3, 'APR' : 4, 'MAY' : 5, 'JUN' : 6,'JUL' : 7, 'AUG' : 8, 'SEP' : 9, 'OCT': 10, 'NOV': 11, 'DEC' : 12}
parties = {'Bachmann, Michelle': 'Republican','Romney, Mitt': 'Republican','Obama, Barack': 'Democrat',"Roemer, Charles E. 'Buddy' III": 'Reform','Pawlenty, Timothy': 'Republican','Johnson, Gary Earl': 'Libertarian','Paul, Ron': 'Republican','Santorum, Rick': 'Republican','Cain, Herman': 'Republican','Gingrich, Newt': 'Republican','McCotter, Thaddeus G': 'Republican','Huntsman, Jon': 'Republican','Perry, Rick': 'Republican' }
導包:
''' 遇到問題沒人解答?小編創建了一個Python學習交流QQ群:857662006 尋找有志同道合的小伙伴,互幫互助,群里還有不錯的視頻學習教程和PDF電子書! ''' # 導包import numpy as np import pandas as pd from pandas import Series, DataFrame1.
2.
3.
4.
5.
6.
7.
8.
9.
總結
以上是生活随笔為你收集整理的pandas - 案例(美国2012年总统候选人政治献金数据分析)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: pandas - 案例(股票分析)
- 下一篇: 加你用移动端数据爬取