摘要:
.head() 作用对象:Series和DataFrame 主要用途:返回DataFrame的前N行。当数据量较大时,使用.head()可以快速对数据有个大致了解。 用法: In [16]: data.head() Out[16]: company salary age 0 NaN 43 21 1 阅读全文
摘要:
(1)运行后报错:“TypeError: cannot use a string pattern on a bytes-like” 原因:content用decode(‘utf-8’)进行解码,由bytes变成string。py3的urlopen返回的不是string是bytes。 解决方案:把’c 阅读全文
摘要:
def main(): num = int(input('请输入行数: ')) yh = [[]] * num #创建num行空列表 for row in range(len(yh)): #遍历每一行 yh[row] = [None] * (row + 1) for col in range(len 阅读全文