文件元数据标记和组织。

coda的Python项目详细描述


CODA是一个文件系统管理器,专为经常处理 有大量的异构数据。在这个数据主宰一切的时代,能够 高效地搜索和标记这些数据对于保持生产力至关重要。尾波 允许您使用任意元数据标记文件,以便在 随着时间的推移管理/分析大型数据集。

作为一个简单的例子,coda可能有助于组织任意数据集, 请参见以下示例(请参见documentation 有关更深入的文档:

>>>importcoda>>>>>># generate a collection of files from a directory>>>cl=coda.Collection('/path/to/test/data')>>>>>># show all of the files in the structure>>>printcl/path/to/test/data/type1.txt/path/to/test/data/type1.csv/path/to/test/data/type2.txt/path/to/test/data/type2.csv>>>>>># set properties about the collection>>>cl.group='test'>>>cl.cohort='My Cohort'>>>>>># add the files in the collection to the database>>># for tracking and retrieval later>>>coda.add(cl)>>>>>># do the same with a training dataset>>>cl=coda.Collection('/path/to/train/data',metadata={'group':'train'})>>>coda.add(cl)>>>>>># wait ... add one more file in a different location to>>># the training set>>>fi=coda.File('/my/special/training/file.csv')>>>fi.group='train'>>>coda.add(fi)>>>>>># ... later in time ...>>>>>># query all of our training files>>>cl=coda.find({'group':'train'})>>>printcl/path/to/train/data/type1.txt/path/to/train/data/type1.csv/path/to/train/data/type2.txt/path/to/train/data/type2.csv/my/special/training/file.csv>>>>>># filter those by csv files>>>printcl.filter(lambdax:'.csv'inx.name)/path/to/train/data/type1.csv/path/to/train/data/type2.csv/my/special/training/file.csv>>>>>># tag the special file with new metadata>>>cl.files[-1].special=True>>>coda.add(cl.files[-1])>>>>>># query it back (for the example)>>>fi=coda.find_one({'special':True})>>>printfi.metadata{'group':'train','special':True}

文档

有关安装和使用说明,请参阅documentation

问题/反馈

GitHub issue tracker中提交问题。

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

推荐PyPI第三方库


热门话题
我可以用C++代码使用java代码吗?   java使用JSR303在派生类中提供更具体的约束   java在这个查找唯一路径数算法中我做错了什么?   java如何为2个不同的服务提供商使用2个不同的SSL证书?   java在Gridview上绘制文本   java使用连接for循环构建字符串名   java StringBuilder拆分无法处理某些文件   java事件关注EditText   Java Web Start“找不到URL的缓存资源”   java程序从命令行运行的速度比在Eclipse中慢   java为什么HttpServletRequest会截断#字符上的url输入?   java自定义折叠工具栏平滑标题大小调整   使用Mockito对安卓 java中调用另一个静态函数的函数进行单元测试   http在java客户机中使用cachecontrol头   java如何使用。是否使用Delimiter从输入文件中排除标点符号和数字?   使用上下文作为参数/参数的java   java更有效地从Jar中提取文件   java为多个JButton提供相同的actionListener