使用pandas进行数据处理,主要有对某列数据事先进行提取,提取其中的identifier。用到的操作就是df['column'] = df['column'].apply(). 对数据处理完之后用到的就是matplotlib package,这时需要使用 command ipython --pyl ...
分类:
其他好文 时间:
2017-07-04 11:18:55
阅读次数:
156
最近在做生成电视剧本小项目,遇到以下报错 在此先给出解决方法,后续整理一下,写上原因 初始有报错代码: 改进后的代码: 可参考: ValueError: Attempt to reuse RNNCell with a different variable scope than its first u ...
分类:
编程语言 时间:
2017-07-01 10:01:37
阅读次数:
1224
1. 在Anaconda Prompt里输:jupyter notebook --generate-config 然后找到这个文件:C:\Users\{YOUR NAME}\.jupyter\jupyter_notebook_config.py, 修改这条字段:c.NotebookApp.noteb ...
分类:
其他好文 时间:
2017-07-01 09:47:31
阅读次数:
211
一:列表:list[] 增 In [125]: a=[] #新增方法1 In [126]: a.append("hello") In [127]: a Out[127]: ['hello'] #新增方法2 In [128]: a.insert(0,"huahua") In [129]: a Out[ ...
分类:
其他好文 时间:
2017-06-30 20:56:55
阅读次数:
145
##############python################一python的简介1.python的优点(1)创始人评价:简单、优雅、明确简单体现在如果你的母语是英语,写python脚本就像写文章,很简单;优雅体现在python的格式,比如缩进来确定代码块,可避免编程人员进行复杂的嵌套;明确体现在解决问题的方法只有..
分类:
编程语言 时间:
2017-06-29 01:11:43
阅读次数:
281
matplotlin 入门 1、启动: ipython --pylab 2、通常引入的约定是: import matplotlib.pyplot as plot 3、matplotlib的图像都位于Figure对象中,subplot是绘制在Figure上的子图表。 、 ...
分类:
其他好文 时间:
2017-06-28 02:02:12
阅读次数:
198
虚拟机安装的linux6.7版本,自带的python是2.6,如果不需要升级python版本的可以直接安装ipython[root@adsl-172-10-0-3~]#python-V----查看python版本[root@adsl-172-10-0-3~]#yuminstallpython-pip[root@adsl-172-10-0-3~]#pipinstallipython[root@adsl-172-10-0-3~]#pipinsta..
分类:
编程语言 时间:
2017-06-27 22:25:23
阅读次数:
505
在Centos7下使用ipython时,发现有个warning,提示无法保存历史记录 解决方法:在编译python3时,没有安装sqlite-devel;所以会发出此警告。yum安装sqlite-devel后重新编译安装python3即可解决 Centos7中安装python3.6:http://w ...
分类:
编程语言 时间:
2017-06-26 23:55:51
阅读次数:
309
一、通过压缩包安装ipython 1、下载ipython安装包 2、安装ipython 3、通过pip安装ipython所有缺失模块,直至ipython运行成功 二、直接通过pip安装ipython pip安装地址:http://www.cnblogs.com/chengd/p/7078588.ht ...
分类:
编程语言 时间:
2017-06-26 23:51:57
阅读次数:
1168
以下代码用Pyspark+IPython完成统计日志空行的数量:读取日志,创建RDD:myrdd=sc.textFile("access.log")不使用累加器:In[68]:s=0
In[69]:deff(x):
...:globals
...:iflen(x)==0:
...:s+=1
...:
In[70]:myrdd.foreach(f)
In[71]:print(s)得出结果为:0原因是python的变量,即..
分类:
其他好文 时间:
2017-06-21 19:50:47
阅读次数:
150