摘要:
运行结果: 阅读全文
摘要:
import pandas as pd data = pd.DataFrame([[1, 2], [1, 2], [3, 2], [1, 3], [1, 2]]) # 去重 data_new = data.drop_duplicates() print(data_new) 0 1 0 1 2 2 3 2 3 1 3 阅读全文
摘要:
import pandas as pd import numpy as np # 生成需要字段的数据 data = np.random.normal(0, 1, (100, 30)) row = ["第{}列".format(i) for i in range(30)] col = ["第{}行".format(i) for i in range(100)] # 生成Dataframe数据 df 阅读全文
摘要:
import pandas as pd # 显示所有列,行 # pd.set_option('display.max_columns', None) # pd.set_option('display.max_rows', None) # pd.set_option('max_colwidth',100) # 读取文件 df = pd.read_csv("z:/clear1.csv", encodi 阅读全文
摘要:
运行结果: 阅读全文