小编cav*_*avs的帖子

有没有办法让Seaborn或Vincent互动?

我一直试图找到一种方法让Seaborn和Vincent互动,以便我可以,例如,实时放大/缩小情节的特定区域.这可能吗?或者,是否有其他推荐的库(不是基于云的服务)可以很好地可视化时间序列数据?

python time-series pandas seaborn vincent

8
推荐指数
1
解决办法
5249
查看次数

ipywidgets:如何根据复选框选择更新多个系列的绘图

我正在使用Ipython笔记本,pandas库和散景图库,我有一个生成网格图的功能.我正在尝试设置一些复选框,每个复选框对应于其中一个图,然后仅使用选中了相应复选框的图更新网格图.似乎没有太多支持ipywidgets libray.这是我到目前为止的尝试; 我不知道如何将我创建的复选框传递给我的函数来更新我的网格图,所以任何帮助都将非常感激.谢谢.

attributes = df.columns.tolist()
from ipywidgets import Checkbox, interact
from IPython.display import display

chk = [Checkbox(description=attributes[i]) for i in range(len(attributes))]
#this displays the checkboxes I created correctly
display(*chk)

#update plot takes in the names of the columns to be displayed and returns 
#a gridplot containing all corresponding plots
#not sure about the part below though
interact(updatePlot,args=chk)
Run Code Online (Sandbox Code Playgroud)

python checkbox ipython pandas bokeh

3
推荐指数
1
解决办法
2280
查看次数

正则表达式匹配字符串中的确切模式

如果我有以下字符串'某些数字66666666666666666667867866和序列号151283917503423和8888888'并且我想找到15位数字(因此只有151283917503423)我该怎么做才能使它与更大的数字不匹配并处理可能性字符串可以只是'151283917503423'因此我无法识别它可能在两边都包含空格?

serial = re.compile('[0-9]{15}')
serial.findall('some numbers 66666666666666666667867866 and serial 151283917503423 and 8888888')
Run Code Online (Sandbox Code Playgroud)

这将返回66666666666666666667867866和151283917503423,但我只想要后者

python regex

3
推荐指数
1
解决办法
591
查看次数

标签 统计

python ×3

pandas ×2

bokeh ×1

checkbox ×1

ipython ×1

regex ×1

seaborn ×1

time-series ×1

vincent ×1