IPython使用问题记录

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使用问题记录_第1张图片

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

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

result = f(a, b, c, w)

IPython使用问题记录_第2张图片

你可能感兴趣的:(IPython使用问题记录)