Skip to content

Conversation

@MIKEILOLITESLA
Copy link
Owner

  1. 上传了修改后的 代码
  • 更新了部分代码
  • 修改了上个版本中被指出的问题
  • 分析数据的 title 改为汉语表示
  • 增加了在当前文件夹中生成 result.txt 文件的功能,使结果更方便观看

Copy link
Owner Author

@MIKEILOLITESLA MIKEILOLITESLA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 更新了 九月五号周四和九月四号周三的代码,commit name 为 Sep 5th coding

Copy link
Owner Author

@MIKEILOLITESLA MIKEILOLITESLA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以通过在后面加 arg 的形式来改变分析的表格

  • '-A' 或者 '--Table_A' 后面加文件名替换 Applestore.csv 文件
  • '-B' 或者 '--Table_B' 后面加文件名替换 googleplaystore.csv 文件

加入了 main 函数

可以用 ./ 的形式执行不用再前缀 python3

未加入文件类型识别功能

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__main__ 语句之后不能有其它函数定义,以及非函数定义的语句了,除非是在 __main__ 自己的作用于之内。

第 100 行 print('##导入数据完成##') 开始以后的还需要再整理成函数封装,并且放到 __main__ 语句的前面。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前面三条语句可以直接合并成一条:file_handle.write('##开始对数据的清理##\n\n')

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前面三条语句直接合并成一条:print('##导入数据完成##\n##开始对数据的清理##')

再去 Google 上搜索一下 print() 语句的用法。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

从这里开始到 除去重复数据组 之前,定义成函数。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

把这个功能定义成函数。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-5 又是什么参数?

应该先把它赋值给一个变量,再以参数的形式传给函数 display_table,这样别人读起来更直观。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题同上。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题同上。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 把这个模块的代码整理成函数。

  2. 在计算方法的代码之前注释一下它的算法。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

每一种不同的数据维度都应该封装成函数。

@MIKEILOLITESLA
Copy link
Owner Author

本次更新的内容

  • 更新了一部分 if name == "main" 理解中的小练习

遇到的问题

  • 既然 name = main 这个函数主要是为了避免程序被其他程序导入的时候不需要的部分也在运行,我使用这个函数的目的就是把这个程序单独运行时能输出结果的部分全部变成 name=main ,然后尽可能的封装好相应的函数,这样其他程序导入的时候就可以只是使用我用 def 封装好的函数了(我现在才明白name=main 和函数封装的目的 orz)那我按照这个方向修改之后得到的文件就可以作为一个模块,在下次需要类似函数的时候直接导入这个模块用相应的函数就好。

接下来的计划

  • 这周内尽量把文件中的 函数部分封装好,做出一个成品

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一个可执行文件里面不能有多个这样的语句。

@ikbear
Copy link
Collaborator

ikbear commented Sep 22, 2019

  1. 遇到的问题 应该是一个总结?挺好的,有进步。但是要和问题区分开,并且把问题暴露出来。

  2. 把这个 pr 里面的其它 comment 一个个解决(resolve)掉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants