摘要:
plt.hist(x, bins=None, range=None, density=None, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwi 阅读全文
摘要:
读取txt或csv数据,按行读取,对每行数据根据','进行分隔,将每行数据以","为间隔分成一个列表 line = re.split(',', line) 对数组内元素出现的次数进行统计 from collections import Counter list_len_array = np.arra 阅读全文
摘要:
df_org = pd.read_csv(path) print(df_org.head(5)) df_org.columns = ["UserID", "Gender", "Age", "Attribution", "Type", "StartTime", "EndTime", "Log", "L 阅读全文
摘要:
在conda的虚拟环境中运行命令 pip install websocket 在进行安装即可 阅读全文
摘要:
一个简单的函数 def greet_user(): """显示简单的问候语""" print("Hello!") greet_user() 第二行的文本被称为文档字符串(docstring)的注释,描述了函数是做什么的。文档字符串用三引号括起,Python使用它们来生成有关程序中函数的文档。第五行直 阅读全文
摘要:
python中接受用户输入需要使用函数 input() input函数工作原理 函数input()让程序暂停运行,等待用户输入一些文本。input返回用户输入内容,再将其存入变量即可获得用户输入。例如: message = input("Tell me something, and I will r 阅读全文