2020年9月4日

python 合并列表问题“list indices must be integers or slices, not list"

摘要: 有一个列表的列表,每个列表包含一个公共列,A,B,用作索引,如下所示 df_list=[[df1], [df2],[df3], [df4], [df5, df6]] 我想根据所有数据帧中的公共列A、B将数据帧合并到单个数据帧中 我试过了pd.concat(df_list),但不起作用,产生错误如下: 阅读全文

posted @ 2020-09-04 14:59 wudymand 阅读(6135) 评论(0) 推荐(0) 编辑

字符串之间的空格,格式化打印字符串-python

摘要: 我想打印”How do you like python so far?”,在python3中。但当我运行代码时,字符串之间没有空格。我该怎么办? word1 = "How" word2 = "do" word3 = "you" word4 = "like" word5 = "Python" word 阅读全文

posted @ 2020-09-04 14:55 wudymand 阅读(408) 评论(0) 推荐(0) 编辑

导航