摘要:参考:pandas筛选出表中满足另一个表所有条件的数据 参考:pandas:匹配两个dataframe 使用 pd.merge 来实现 on 表示查询的 columns,如果都有 id,那么这是很好的区别项,找到 id 相同的进行merge。
阅读全文
摘要:参考:Python3 Print 同一行打印显示进度条效果 参考:\r\n, \r and \n what is the difference between them? [duplicate] 参考:python的print格式化输出,以及使用format来控制。 实现思路就是不停地删除之前打印的
阅读全文
摘要:save data in csv file.
阅读全文
摘要:一、两个经纬度点之间的距离
ϕ1,
ϕ2是纬度,
λ1,
λ2是经度。均是弧度制数值 ArcGIS Python 实现 python 实现: 二、经纬度网格的面积计算
ϕ1,
ϕ2是纬度,
λ1,$\lamb
阅读全文
摘要:ref: Markdown基本语法 ref: Markdown Guide ref: Markdown Cheatsheet ref: Markdown Tutorial Lists Basic Syntax The Markdown elements are outlined in John Gr
阅读全文
摘要:【Question 01】 When converting Tweets info to csv file, commas in the middle of data (i.e. location: Sydney, NSW) can make a mistake of the csv file (c
阅读全文
摘要:Ref: json -- JSON encoder and decoder JSON(JavaScript Object Notation) can help us to see data more intuitive. Example: import json >>> a = {"hobbies"
阅读全文
摘要:参数说明: coordinates:Represents the geographic location of this Tweet as reported by the user or client application. The inner coordinates array is forma
阅读全文
摘要:1. 读取文件,计算 tweets 数目 python中readline判断文件读取结束的方法 line == '' python:如何检查一行是否为空行 line == '\n' or line == '\r\n' line == '' line == '\n' or line == '\r\n'
阅读全文
摘要:参考:Python判断文件是否存在的三种方法 参考:在python文件中执行另一个python文件 参考:How can I make a time delay in Python? 参考:Twilio SMS Python Quickstart 1. 收集某一区域的实时数据 Name: AUS.p
阅读全文
摘要:对于这样的一个题目来说,出看来,可能会想到判断是否为质数,但其实并不需要。 只要按照从2开始遍历,只要遇到可以整除的就是想要的质数,理由是,如果遇到合数的话,那么在此之前一定会遇到这个合数的质因子,因此不会存在这种情况。 另外就是遍历的后边界,其实随着number的质因子被找到,因此number在逐
阅读全文
摘要:参考:Numpy学习——数组填充np.pad()函数的应用 举例说明: 语法说明:
阅读全文
摘要:参考:Jupyter 主题更换 参考: Restoring default theme #86 修改主题的方法: 主题安装,cmd 输入 pip install --upgrade jupyterthemes 首先在 cmd 上输入 jt -l 选择自己需要的主题,如 jt -t monokai 使
阅读全文
摘要:构建 Polynomial 类,实现 +, , , / and +=, =, =, /= 参考:[如何用python编程求解二元一次方程组。如x+y=3;x y=1][1] 参考:[python对重载运算符的限制][2] 参考:[python:自定义对象的打印][3] operator | over
阅读全文
摘要:参考: "新功能发布!Markdown写博客!" 参考: "在博客园的markdow编辑器中使用SVG" 参考: "SVG基本形状及样式设置" COMP9021作业,tangram Australia Map with avg format
阅读全文
摘要:Merging two strings into a third one Say that two strings s1 and s2 can be merged into a third string s3 if s3 is obtained from s1 by inserting arbitr
阅读全文
摘要:yield:生成器 yield from:将生成器 yield 的内容相当于逐一在 yield 一般 参考:Python 3: Using "yield from" in Generators - Part 1 | Simeon Visser 参考:Python3 迭代器与生成器 参考:彻底理解 P
阅读全文
摘要:参考:Python 使用type来定义类 - XeanYu - CSDN博客
阅读全文
摘要:参考:Python 实现递归算法 - 另一个自己 - CSDN博客 参考:一文读懂递归算法 - 我的笔记 - CSDN博客 用递归实现以下算法: Factorial Hannoi Tower Fibonacci 迷宫 使用递归计算组合(permutation) 对于一个元素的集合,直接返回值即可 对
阅读全文