擅长:python、mysql、java
<p>您可以使用<code>loc</code>来分割数据。假设您的原始数据集与您列出的数据集相同,并且存储为<code>df</code>,那么首先创建一个包含要过滤的单词的列表。在</p>
<pre><code>content_to_filter_by = ['Developing','Ineffective']
new_df = df.loc[(df['col'].isin(content_to_filter_by))&(df['col_16'].isin(content_to_filter_by)),:].copy()
</code></pre>
<p>有关使用<code>loc</code>和位于<a href="https://pandas.pydata.org/pandas-docs/stable/indexing.html" rel="nofollow noreferrer">here</a>的其他数据帧切片器的文档。在</p>