支持数据科学项目的python类。

resumableds的Python项目详细描述


可恢复的

支持数据科学项目的python类。

Resumabled支持您编写数据科学脚本,包括保存/恢复功能。 可以保存和恢复数据,避免从数据存储中不必要地检索原始数据。 数据目录结构的灵感来自cookiecutter数据科学(https://drivendata.github.io/cookiecutter-data-science/)。 类还支持语句“analysisisadag”(https://drivendata.github.io/cookiecutter-data-science/#analysis-is-a-dag)。

resumabled是用纯Python编写的,打算在Jupyter笔记本中使用

示例

<code> 
proj1 = RdsProject('project1') # create object from class (creates the dir if it doesn't exist yet)
proj1.raw.df1 = pd.DataFrame() # create dataframe as attribute of proj1.raw (RdsFs 'raw')
proj1.defs.variable1 = 'foo' # create simple objects as attribute of proj1.defs (RdsFs 'defs')
proj1.save() # saved attributes of all RfdFs in proj1 to disk
</code>
This will result in the following directory structure (plus some overhead of internals):
- <output_dir>/defs/var_variable1.pkl
- <output_dir>/raw/df1.pkl
- <output_dir>/raw/df1.csv

Note, pandas dataframes are always dumped as pickle for further processing and as csv for easy exploration. The csv files are never read back anymore.

Later on or in another python session, you can do this:
proj2 = RdsProject('project1') # create object from class (doesn't touch the dir as it already exists) All vars and data is read back to their original names.
proj2.defs.variable1 == 'foo' ==> True
isinstance(proj2.raw.df1, pd.DataFrame) ==> True

可恢复的指示灯

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何在java swing表单配置文件中显示动态布局   swing Java使用GridLayout和鼠标交互式JPanel创建JFrame   java使用jsp dao和servlet从数据库中的4行中只插入几行   java SqlLite:我们可以选择行作为列吗?   启动glassfish服务器时java获取错误   PersistenceUnit的java部署[…]失败。关闭此PersistenceUnit的所有工厂   java将具有多个关系的实体与集合中的任何元素进行匹配   java对命名模式的建议,该模式在op失败时尝试强制转换返回null   使用jtwitter的java安卓抛出错误   使用Java方法查找数组中最小int的位置   SwingJava。网络气球提示没有出现   java无法使用JavaMail api发送邮件   java HashSet contains()为自定义对象返回false。hashCode()和equals()似乎实现正确   Java:在运行时和编译时向类中添加字段?   java正在服务类中导入jersey和JAXR,这被认为是错误的做法