用于操作数据帧的非常简单的接口

magicpandas的Python项目详细描述


在_建_工程_

magicpandas

magicpandas使与熊猫的合作变得非常简单。在

主要特点

  • MagicDataFrame子类化DataFrame,使现有方法更直观,并添加新方法
  • MagicDataFrame添加显示数据时默认使用的详细标签
  • MagicDataFrame支持Django-ORM
    • inspectdf使用DataFrame列类型生成Django模型类(参见inspectdb
    • to_django使用django ORM的bulk_updatebulk_create将数据帧保存到SQL。在
安装

pip install magicpandas

示例
frommagicpandasimportMagicDataFramemdf=MagicDataFrame(df)mdf2=mdf.drop('*e',axis=1)# df2 drops all columns ending in "e"mdf.browse()# opens the DataFrame in MS Excel with nice formattingmdf.browse(client='webbrowser')# opens the DataFrame as html displayed in Chrome with nice formattingmdf.graph()# Opens a graph in Chrome using the excellent Altair library using sensible encodingsmdf.inspect_for_django()# prints text that corresponds to a Django model definition

哲学

  • 约定优先于配置
  • 使用Altair而不是matplotlib,因为它是web优先的,基于 Grammar of Graphics
  • 使用MS Excel进行数据浏览
  • 意图和执行之间应该没有什么差距

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

推荐PyPI第三方库


热门话题
java 安卓阻止编译的第三方库的特定网站   java如何使用带回调的send()方法返回元数据?   将双值数组从一个java类传递到另一个java类   java OracleJava7安装程序返回错误代码   smb共享上新创建的Java文件没有用户,也没有组   打印unicode值而不是字符串的Java程序   java将字符串放在括号中的语法意义   java将对象添加到arraylist,除非它已经存在   java正在尝试查找回文数   java如何解决“过时元素引用:导航到上一页时元素未附加到页面文档”   java从无关方法调用超级方法   用于java代码的socket网络设置,以便不同网络/位置上的两台计算机可以使用RMI   用Java字符数组处理C字符数组