我正在尝试通过查询 pandas 中的值来创建图形DataFrame。
在这一行:
data1 = [np.array(df.query('type == i')['continuous']
for i in ('Type1', 'Type2', 'Type3', 'Type4')]
Run Code Online (Sandbox Code Playgroud)
我收到错误:
UndefinedVariableError: name 'i' is not defined
Run Code Online (Sandbox Code Playgroud)
我错过了什么?