跳转到主要内容

Curvenote为Jupyter笔记本中的数据科学提供的辅助库

项目描述

curvenote

Curvenote辅助库,用于在Jupyter笔记本中使用Python内核进行工作

## 安装

    ~$ python -m pip install curvenote

摘要

  • stash 在不显示数据的情况下将字典或pandas数据框保存在单元格输出中

         from curvenote import stash
    
         stash('myvars', myvars)
    
  • AppState 基于traitlet的类,用于帮助在ipywidgets ui中管理状态

      from curvenote import AppState, with_state
    
      state = AppState()
    
      # register a widget in state
      wave_1_amp = FloatSlider(1.0, min=0.1, max=5.0, step=0.1, description="1 - Amp")
      state.register_stateful_widget(wave_1_amp, "wave_1_amp", Float(1.0))
    
      # register any trailet as a propery
      state.register_stateful_property("my_dict", Dict(dict(A="hello", B="world", C=1)))
    
      # observe the entire state
      def my_update_fn(state):
        some_calc_function(state.wave_1_amp, state.my_dict)
      state.observe(with_state(my_update_fn))
    
      # observe a single registered widget
      def wave_1_observer(evt):
        pass
      state.register_widget_observer("wave_1_amp", wave_1_observer)
    
      # observe a single trait
      def trait_observer(evt):
        pass
      state.register_widget_observer("my_dict", trait_observer)
    
      # display state changes for debugging
      from IPython.display import display
      display(state.outlet)
    

项目详情


发布历史 发布通知 | RSS源

下载文件

下载适用于您平台的应用程序。如果您不确定选择哪个,请了解有关安装包的更多信息。

源代码分发

curvenote-0.7.2.tar.gz (4.0 kB 查看哈希值)

上传时间 源代码

构建分发

curvenote-0.7.2-py3-none-any.whl (4.3 kB 查看哈希值)

上传时间 Python 3

支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面