【发布时间】:2022-12-18 09:30:33
【问题描述】:
我有一个看起来像这样的数据集:
print(animals_in_zoo)
// I only know the name of the first column, the second one is dynamic/based on a previously calculated variable
animals | dynamic_column_name
// What the data looks like
elefant x
turtle
monkey
giraffe x
swan
tiger x
我想要的是收集第二列的值等于“x”的行。
我想做的是这样的:
SELECT * from data where col2 == "x";
之后,我只想抓取第一列并创建一个字符串对象,如“elefant giraffe tiger”,但这是比较容易的部分。
【问题讨论】: