使用pandas.Series.apply可以编写函数,对Dataframe中的每一个Series进行处理,其用法如下:
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.apply.html
然而,dataframe在读取Series时,会不可避免的带上column名字(如这里的Date_received),
使得apply函数出错。
解决方法,是在读取的时候,将 header = None 改为 header = 0 即可
header=0 denotes the first line of data rather than the first line of the file.