科学网

 找回密码
  注册
python-删除非ASCII字符,但离开句点和空格
郑俊娟 2015-2-10 18:37
转(别人在论坛上提出的问题) 我正在与一个txt文件。我想从文件中没有非ASCII字符的文本字符串。不过,我要离开的空间和时间。目前,我正在剥者也。下面的代码: def onlyascii(char): if ord(char) 48 or ord(char) 127: return '' else: return chardef get_my_string(file_path): f=ope ...
个人分类: python|6146 次阅读|没有评论
Python中的结构化数据分析利器-Pandas简介
郑俊娟 2015-1-12 15:59
此文转载于XXXXXX处... Pandas 是python的一个数据分析包,最初由 AQR Capital Management 于2008年4月开发,并于2009年底开源出来,目前由专注于Python数据包开发的 PyData 开发team继续开发和维护,属于PyData项目的一部分。Pandas最初被作为金融数据分析工具而开发出来,因此,pandas为时间序列分析提供了很好 ...
个人分类: python|6595 次阅读|没有评论
10 Minutes to pandas
郑俊娟 2015-1-12 15:57
This is a short introduction to pandas, geared mainly for new users. You can see more complex recipes in the Cookbook Customarily, we import as follows In : import pandas as pd In : import numpy as np In : import matplotlib.pyplot as plt Object Creation See the Da ...
个人分类: python|3513 次阅读|没有评论

本页有 7 篇博文因作者的隐私设置或未通过审核而隐藏

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-18 08:29

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部