摘要:
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='::'... 阅读全文
摘要:
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... 阅读全文
摘要:
''' 数据的读取 ''' import pandas as pd import warnings warnings.filterwarnings('ignore') # 读取文本文件 users = pd.read_table('./users.dat', header=None, names=['UserID', 'Gender', 'Age', 'Occupation', 'Z... 阅读全文
摘要:
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... 阅读全文