IPython使用问题记录

来源:互联网 发布:淘宝客组件推广教程 编辑:程序博客网 时间:2024/04/29 18:39

1. ‘c’ engine does not support regex separators:

In [73]: users = pd.read_csv(upath, sep='::', header=None, names=unames, encoding=encoding)/Users/[your_name]/Library/Enthought/Canopy_64bit/User/bin/ipython:1: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators; you can avoid this warning by specifying engine='python'.

根据报错提示输入命令就OK了:

In [74]: users = pd.read_csv(upath, sep='::', header=None, names=unames, encoding=encoding, engine='python')

2. %run命令:
在IPython shell中访问脚本中的变量,执行时只用%run:
这里写图片描述

希望脚本能访问交互式IPython命名空间中定义的变量:%run -i

def f(x, y, z, w):    return (x + y) / z + wa = 5b = 6c = 7.5result = f(a, b, c, w)

这里写图片描述

0 0