摘要: import pandas as pd import warnings warnings.filterwarnings('ignore') # 读取用户表 users = pd.read_table('./users.dat', header=None, names=['UserID', 'Gender', 'Age', 'Occupation', 'Zip-code'], sep='::'... 阅读全文
posted @ 2019-07-29 22:10 一如年少模样 阅读(591) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import pandas as pd df = pd.DataFrame({'key1': ['a', 'a', 'b', 'b', 'a'], 'key2': ['one', 'two', 'one', 'two', 'one'], 'data1': np.random.ran... 阅读全文
posted @ 2019-07-29 21:00 一如年少模样 阅读(796) 评论(0) 推荐(0) 编辑
摘要: ''' 数据的读取 ''' import pandas as pd import warnings warnings.filterwarnings('ignore') # 读取文本文件 users = pd.read_table('./users.dat', header=None, names=['UserID', 'Gender', 'Age', 'Occupation', 'Z... 阅读全文
posted @ 2019-07-29 20:15 一如年少模样 阅读(520) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import numpy as np df = pd.DataFrame(np.arange(50).reshape(10, 5), columns=list('abcde')) print(df) print(df.describe()) print(df.sem()) df1 = pd.Series(['a', 'b', 'c', 'd', 'a... 阅读全文
posted @ 2019-07-29 18:53 一如年少模样 阅读(229) 评论(0) 推荐(0) 编辑