我在用Spyder。使用Pandas创建一些数据帧:
import pandas as pd
import numpy.random as npr
npr.seed(0)
df = pd.DataFrame(npr.randint(1, 10, size=(3,4)))
我在使用时有一个奇怪的行为
df.info()
:
dfi = df.info()
打印结果:
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 3 entries, 0 to 2
Data columns (total 4 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 0 3 non-null int32
1 1 3 non-null int32
2 2 3 non-null int32
3 3 3 non-null int32
dtypes: int32(4)
memory usage: 180.0 bytes
并且变量被赋值
None
.
我怀疑一个包坏了,重新安装了熊猫和间谍,结果一样。在痛苦地重置微型软骨之前,我想知道这是否是可以解决的问题,或者至少可以通过一些测试来理解。