我的表:
$sql = "SELECT _t.*, _t1.*, _t2.*";
$sql .= "FROM _test as _t ";
$sql .= "LEFT JOIN _test1 as _t1 ";
$sql .= "ON _t.test_column=_t1.test_column ";
$sql .= "LEFT JOIN _test2 as _t2 ";
$sql .= "ON _t.test_column = _t2.test_column ";
$sql .= "WHERE _t.test_column ='test_value'";
我想选择或显示第一行?我应该怎么做。
Ram Shyam Kamal
2 nan 4
1 2 5
8 7 10
答案 0 :(得分:0)
让df
成为您的数据框,您可以:
df = df[df.isnull().any(axis=1)]
返回:
Ram Shyam Kamal
0 2 NaN 4