IPython Notebook单元格多输出 [英] IPython Notebook cell multiple outputs

查看:99
本文介绍了IPython Notebook单元格多输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IPython Notebook中运行此单元格:

I am running this cell in IPython Notebook:

# salaries and teams are Pandas dataframe
salaries.head()
teams.head()

结果是我只得到输出团队数据框架而不是工资团队。如果我只是运行 salaries.head()我得到工资数据框的结果但是在运行两个语句时我只看到 teams.head()的输出。我怎么能纠正这个?

The result is that I am only getting the output of teams data-frame rather than of both salaries and teams. If I just run salaries.head() I get the result for salaries data-frame but on running both the statement I just see the output of teams.head(). How can I correct this?

推荐答案

你试过 display 命令吗? ?

from IPython.display import display
display(salaries.head())
display(teams.head())

这篇关于IPython Notebook单元格多输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆