摘要: s = pd.Series(['Tom', 'William Rick', 'John', 'Alber@t', np.nan, '1234','SteveMinsu']) s.str#不能对series对象使用str处理函数,必须转换成pandas.core.strings.StringMetho 阅读全文
posted @ 2020-05-01 09:57 unuliha 阅读(746) 评论(0) 推荐(0)
摘要: unsorted_df=pd.DataFrame(np.random.randn(10,2),index=[1,4,6,2,3,5,9,8,0,7], columns=['col2','col1']) 8.1 按索引进行排序(sort_index()) ### 按索引排序,需要指定轴和方向,默认为列 阅读全文
posted @ 2020-05-01 09:46 unuliha 阅读(6861) 评论(0) 推荐(1)