alex_bn_lee

导航

随笔分类 -  Python Study

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页

Study of Python.
【464】文本转字符向量bag of words
摘要:利用 sklearn.feature_extraction.text 中的 CountVectorizer 来实现 首先获取所有的文本信息 然后将文本信息转化为从 0 开始的数字 获取转换后的字符向量 参见如下代码: >>> text_01 = "My name is Alex Lee." >>> 阅读全文

posted @ 2020-05-16 20:55 McDelfino 阅读(247) 评论(0) 推荐(0)

【457】Word2Vec,Embedding层,词嵌入
摘要:参考:Word2Vec Tutorial - The Skip-Gram Model 参考:Word2Vec Tutorial Part 2 - Negative Sampling 参考:通俗理解word2vec 参考:word2vec 中的数学原理详解 参考:一文搞懂word embeddding 阅读全文

posted @ 2020-02-08 17:36 McDelfino 阅读(1598) 评论(0) 推荐(0)

【456】python string 类内容(去除文本标点)
摘要:repr() 函数可以将对象转为 string 类型。 主要用于 NLP 处理,里面存在一些常量列表,包括数字、字母、大写字母、小写字母、标点符号、空格等。 参考:6.1. string — Common string operations 可以用于删除文本中的标点符号,将标点符号 replace 阅读全文

posted @ 2020-02-07 17:36 McDelfino 阅读(1178) 评论(0) 推荐(0)

【452】pandas筛选出表中满足另一个表所有条件的数据
摘要:参考:pandas筛选出表中满足另一个表所有条件的数据 参考:pandas:匹配两个dataframe 使用 pd.merge 来实现 on 表示查询的 columns,如果都有 id,那么这是很好的区别项,找到 id 相同的进行merge。 阅读全文

posted @ 2019-11-16 08:22 McDelfino 阅读(1265) 评论(0) 推荐(0)

【451】python 同一行打印进度条
摘要:参考:Python3 Print 同一行打印显示进度条效果 参考:\r\n, \r and \n what is the difference between them? [duplicate] 参考:python的print格式化输出,以及使用format来控制。 实现思路就是不停地删除之前打印的 阅读全文

posted @ 2019-11-15 15:05 McDelfino 阅读(624) 评论(0) 推荐(0)

【450】获取一段文字中所有的大写字母词组/词
只有注册用户登录后才能阅读该文。

posted @ 2019-11-14 06:36 McDelfino 阅读(2) 评论(0) 推荐(0)

【449】backup get weekly tweets
摘要:save data in csv file. 阅读全文

posted @ 2019-11-10 14:00 McDelfino 阅读(148) 评论(0) 推荐(0)

【447】两经纬度点之间的距离计算(经纬度网格面积)
摘要:一、两个经纬度点之间的距离 $\phi_1$,$\phi_2$是纬度,$\lambda_1$,$\lambda_2$是经度。均是弧度制数值 ArcGIS Python 实现 python 实现: 二、经纬度网格的面积计算 $\phi_1$,$\phi_2$是纬度,$\lambda_1$,$\lamb 阅读全文

posted @ 2019-11-07 15:23 McDelfino 阅读(4030) 评论(0) 推荐(0)

【445】Markdown Syntax
摘要:ref: Markdown基本语法 ref: Markdown Guide ref: Markdown Cheatsheet ref: Markdown Tutorial Lists Basic Syntax The Markdown elements are outlined in John Gr 阅读全文

posted @ 2019-10-24 07:41 McDelfino 阅读(236) 评论(0) 推荐(0)

【444】Data Analysis (shp, arcpy)
摘要:ABS suburbs data of AUS 1. Dissolve Merge polygons with the same attribute of "SA2_NAME16". 2. Add Centroid XY After using the "Add Geometry Attribute 阅读全文

posted @ 2019-10-23 08:43 McDelfino 阅读(369) 评论(0) 推荐(0)

【443】Tweets Analysis Q&A
摘要:【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 阅读全文

posted @ 2019-10-17 07:01 McDelfino 阅读(120) 评论(0) 推荐(0)

【441】JSON format
摘要:Ref: json -- JSON encoder and decoder JSON(JavaScript Object Notation) can help us to see data more intuitive. Example: import json >>> a = {"hobbies" 阅读全文

posted @ 2019-10-10 06:07 McDelfino 阅读(208) 评论(0) 推荐(0)

【440】Tweet 元素意义
摘要:参考:Tweet Object 参考:Geo Objects 参考:User Object Ref: Place data dictionary Tweet Object Array ofArray ofArray ofFloat User Object Place data dictionary 阅读全文

posted @ 2019-09-28 13:41 McDelfino 阅读(289) 评论(0) 推荐(0)

【439】Tweets processing by Python
摘要:参数说明: coordinates:Represents the geographic location of this Tweet as reported by the user or client application. The inner coordinates array is forma 阅读全文

posted @ 2019-09-24 08:56 McDelfino 阅读(263) 评论(0) 推荐(0)

【438】Python 处理文件
摘要:1. 读取文件,计算 tweets 数目 python中readline判断文件读取结束的方法 line == '' python:如何检查一行是否为空行 line == '\n' or line == '\r\n' line == '' line == '\n' or line == '\r\n' 阅读全文

posted @ 2019-09-18 12:22 McDelfino 阅读(156) 评论(0) 推荐(0)

上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 31 下一页