2019年11月29日

摘要: 在计算机内存中,统一使用Unicode编码,当需要保存到硬盘或者需要传输的时候,就转换为UTF-8编码。 用记事本编辑的时候,从文件读取的UTF-8字符被转换为Unicode字符到内存里,编辑完成后,保存的时候再把Unicode转换为UTF-8保存到文件 由于Python的字符串类型是str,在内存 阅读全文
posted @ 2019-11-29 15:39 FinnChan 阅读(244) 评论(0) 推荐(0) 编辑
 

2019年11月17日

摘要: 如果是用的是hive自带的内存数据库derby,应该先初始化,进入hive目录,里面有一个metestore文件夹(是之前启动hive的derby时自动生成的,这里需要将metastore_db 目录重命名为 metastore_db.tmp,然后再初始化)。 解决步骤(在hive目录下): 1.> 阅读全文
posted @ 2019-11-17 22:16 FinnChan 阅读(1224) 评论(0) 推荐(0) 编辑
 

2019年9月30日

摘要: In [1]: import numpy as np #Simple assignments make no copy of array objects or of their data. a = np.arange(12) b = a # a and b are two names for the 阅读全文
posted @ 2019-09-30 20:43 FinnChan 阅读(176) 评论(0) 推荐(0) 编辑
 

2019年9月28日

摘要: // <![CDATA[ MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: tr 阅读全文
posted @ 2019-09-28 21:17 FinnChan 阅读(162) 评论(0) 推荐(0) 编辑
 
摘要: array.flattern() 展开成一维数组 array.dtype array.astype() 改变数组类型 array.where(条件,true,false) array.clip(min,max) array.mean() 均值 array.std() 标准差 np.round(arr 阅读全文
posted @ 2019-09-28 21:16 FinnChan 阅读(130) 评论(0) 推荐(0) 编辑
 
摘要: // <![CDATA[ MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: tr 阅读全文
posted @ 2019-09-28 21:16 FinnChan 阅读(183) 评论(0) 推荐(0) 编辑
 
摘要: join按行索引进行拼接,merge按列所以进行拼接¶ In [1]: import pandas as pd import numpy as np In [2]: d1 = pd.DataFrame(np.arange(12).reshape(3,4),index=list("ABC"),colu 阅读全文
posted @ 2019-09-28 21:15 FinnChan 阅读(225) 评论(0) 推荐(0) 编辑
 
摘要: In [1]: import pandas as pd import numpy as np In [3]: d1 = pd.DataFrame(np.arange(12).reshape(3,4),index=list("ABC"),columns=list("WXYZ")) print(d1) 阅读全文
posted @ 2019-09-28 21:14 FinnChan 阅读(159) 评论(0) 推荐(0) 编辑
 
摘要: In [1]: import pandas as pd import numpy as np import matplotlib.pyplot as plt In [2]: dtime = pd.date_range(start="20171201",end="20180131",freq="D") 阅读全文
posted @ 2019-09-28 21:12 FinnChan 阅读(649) 评论(0) 推荐(0) 编辑
 
摘要: In [8]: import pandas as pd import matplotlib.pyplot as plt import numpy as np import time In [2]: temp_data = pd.read_csv("./IMDB-Movie-Data.csv") da 阅读全文
posted @ 2019-09-28 21:12 FinnChan 阅读(181) 评论(0) 推荐(0) 编辑