上一页 1 ··· 13 14 15 16 17
摘要: 1 import pandas 2 #Series表示序列,可以表示行或者列 3 4 d={'x':100,'y':300,'z':400} 5 s1=pandas.Series(d) 6 #print(s1.index) #查看其中的索引 7 8 s1=pandas.Series([1,2,3], 阅读全文
posted @ 2020-06-09 19:06 马蹄哒哒 阅读(214) 评论(0) 推荐(0)
摘要: 1 import pandas 2 excel=pandas.read_excel('现代征信学.xlsx',index_col='列名',header=None) #header默认为0,指读取第几行,0代表第一行 3 excel.columns=['Id','title','hh','uei', 阅读全文
posted @ 2020-06-09 19:05 马蹄哒哒 阅读(234) 评论(0) 推荐(0)
摘要: 1 import pandas 2 a=pandas.DataFrame({'ID':[1,2,3],'Name':['Time','Mike','Nick']}) 3 b=a.set_index('ID') #重新设置索引 4 b.to_excel(r'D:\计算机二级\ocr 训练\a.xlsx 阅读全文
posted @ 2020-06-09 19:02 马蹄哒哒 阅读(1113) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17