操作目的 MYSQL Pandas 备注 查询全部数据 SELECT * FROM table; df 或 df.head() Pandas DataFrame 默认显示全部(或用 .head() 查看前几行) 选择特定列 SELECT col1, col2 FROM table; df[['col1', 'col2']] 单列用 df['col'],多列需用双层方括号 条件筛选(WHERE) SELECT * FROM table WHERE age > 30; df[df['age'] > 30] 或 df.query('age > 30') 支持布尔索引...