自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 收藏
  • 关注

原创 Python 列连接

(venv) E:\py3>python py19.py A B C D A B C D A B C D0 a0 b0 c0 d0 a4 b4 c4 d4 a8 b8 c8 d81 a1 b1 c1 d1 a5 b5 c5 d5 a9 b9 c9 d92 a2 ...

2019-09-30 11:47:39 308

原创 python 行连接 合并

#连接与合并数据集: 行连接import pandas as pddf1 = pd.read_csv('./data/concat_1.csv')df2 = pd.read_csv('./data/concat_2.csv')df3 = pd.read_csv('./data/concat_3.csv')print(df1)print(df2)print(df3)row_c...

2019-09-30 00:00:24 656

原创 python 读取csv pickle excel

import pandas as pdimport warningswarnings.filterwarnings("ignore")scientists = pd.read_csv('./data/scientists.csv')names = scientists['Name']print(names)import osif not os.path.exists('./ou...

2019-09-29 21:58:34 567

原创 elasticsearch 分片设计管理

7.0开始 新创建要给索引时,默认只有一个主分片 单个分片,查下算分,聚合不准的问题都可以得以避免单个索引,单个分片时候,集群无法实现水平扩展即使增加新的节点,无法实现水平扩展在es中最小的单元是分片.无法增加节点的方式水平扩展集群增加一个节点后,Elasticsearch会自动进行分片的移动,也叫Shard Rebalancing要是为索引,生成两个主分片,当数量...

2019-09-27 16:10:45 238

原创 elasticsearch7 基础

乐观锁索引ES中 创建一个倒排索引的过程名词 一个B树索引,一个倒排索引节点主分片3个 副本1个主分片分散到3个节点上,每个分片的副本分散到其它几点上两个节点都是存在data_nodes角色...

2019-09-27 14:59:59 149

原创 python DataFrame基本操作

import pandas as pd#索引变成人名了 index=['Rosaline Franklin','William Gosset']scientists = pd.DataFrame({ 'Name':['Rosaline Franklin','William Gosset'], 'Occupation':['Chemist','Statistician'],...

2019-09-22 22:18:08 116

原创 python 创建Series

#Pandas特有的数据类型#创建Series#用于存储一行或一列的数据,以及与之相关的索引的集合import pandas as pds1 = pd.Series([43,56])print(s1)s2 = pd.Series([43,12.4])print(s2)s3 = pd.Series([False,True])print(s3)#有一个是对象,整个都变成对...

2019-09-22 22:05:11 4585

原创 python pandas 可视化统计数据

水平#查看数据进行分组统计import pandasimport matplotlib.pyplot as plt#列用什么分割 --sepdf = pandas.read_csv('./gapminder.tsv',sep='\t')global_yearly_life_expectancy = df.groupby('year')['lifeExp'].mean()prin...

2019-09-22 00:07:50 632

原创 python pandas 查看数据集列和行

#查看数据集中的列import pandas#列用什么分割 --sepdf = pandas.read_csv('./gapminder.tsv',sep='\t')#获取列country_df = df['country']print(country_df)#显示前5行print(country_df.head())#现在是最后五行print(country_df.ta...

2019-09-21 22:49:39 10338

原创 Python Pandas 数据集基础操作

Series: 一维数组系列,也称序列 与Numpy中的一维array类似,二者与Python基本的数据结构list也很相似DataFrame: 二维的表格型数据结构,可以将DataFrame理解为Series的容器,以下的内容主要以DataFrame为主Panel: 三维数组,可以理解为DataFrame的容器#装载数据集#country(国家) continet(洲) year(...

2019-09-19 23:52:09 1068

原创 python 类型 list 差集

(['13070269511', '13070286081', '13070320591', '13070322911', '13070324651', '13070324451', '13070182261', '13070562781', '13070562801', '13070562861'], 22)(['13070269511', '13070286081', '130688...

2019-09-17 20:01:12 80

原创 elasticsearch7 type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/12/index read-only /

可能是 应该是你的磁盘快满了解决方式PUT _settings { "index": { "blocks": { "read_only_allow_delete": "false" } } }

2019-09-11 14:01:09 7699 3

原创 elasticsearch7 安装限制内存使用

http.cors.enabled: truehttp.cors.allow-origin: "*"indices.fielddata.cache.size: 40%indices.breaker.fielddata.limit: 60%indices.breaker.request.limit: 40%indices.breaker.total.limit: 70%

2019-09-10 19:49:01 3630

原创 Elasticsearch聚合限制内存使用

通常为了让聚合(或者任何需要访问字段值的请求)能够快点,访问fielddata一定会快点, 这就是为什么加载到内存的原因。但是加载太多的数据到内存会导致垃圾回收(gc)缓慢, 因为JVM试着发现堆里面的额外空间,甚至导致OutOfMemory异常。最让你吃惊的是,你会发现Elaticsearch不是只把符合你的查询的值加载到fielddata. 而是把index里的所document都加载到内存...

2019-09-10 16:44:00 469 1

原创 Elasticsearch API 增删改查

索引名称 library 分片数 5 shards副本数 1 replicase 输出修改删除

2019-09-10 11:08:03 85

原创 该网页无法正常运作 目前无法处理此请求。 HTTP ERROR 500

关于这个问题由于php.ini配置文件中错误显示关闭导致.将下值由Off 变更为 Ondisplay_errors = Ondisplay_startup_errors = On

2019-09-09 20:22:31 4141

原创 Waiting for table metadata lock的解决方法

show processlist从 information_schema.innodb_trx 表中查看当前未提交的事务select trx_state, trx_started, trx_mysql_thread_id, trx_query from information_schema.innodb_trx\G(\G作为结束符时,MySQL Client会把结果以列模式展示,对于列比较...

2019-09-09 14:12:27 1310

原创 Python datetime 格式化字符串:strftime() strptime

strptime()是将传进来的字符串时间(第一个参数)按照指定格式(第二个参数)转换成datetime类型;字符串–>datetimestrftime()将传进来的datetime时间(第一个参数)按照指定格式(第二个参数)转换成字符串类型;datetime–>字符串;如果指定格式对应位置的时间是空的,默认为0ython 的datetime模块 其实就是date和time 模块...

2019-09-08 15:09:04 15084

转载 python日期与时间戳的各种转换

官方文档的示例中没有我们习惯的日期格式,查了很多博客转换日期和时间戳也都是大概的能得到结果的方式,常将 datetime 和 time 两个模块混用,个人觉得时间格式化不应该这么麻烦,还得用两个模块来支持?故而翻遍了源码,总结以下常用的几种日期和时间戳的转换方式。以下主要有三个元素(时间字符串,格式,Unix时间戳),可将时间字符串转为另一种时间格式,或将时间字符串转为时间戳,或将时间戳转为时间...

2019-09-06 18:03:38 173

原创 python pip3升级

pip3 install --upgrade pip

2019-09-06 15:53:36 70

原创 PHP 日期 包含

如下所示循环2018-10(包含)到2017年1(包含)每个月的开始和结束时间点 $destime = strtotime('2017-01-01'); $beginmonth = strtotime('2018-11-01'); while ($beginmonth > $destime) { $endmonth = $beginmont...

2019-09-04 14:39:31 119

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除