如何根据单元格值删除PandasDataframe中的行而不提供特定的列名?我有这个DataFrame,我想删除单元格包含值'd‘的所有行。A B C D2 1 3 4 04 3 2 1 7 A B C D4 3 2 1 7
有办法做到这一点吗我的google技能只在需要特定列名的情况下找到解决方案。
然后,我想在pandas数据框中显示它。问题是,不知何故,列的名称被删除/没有显示。为什么?print ("Command skipped: ")
rows = cursor.fetchall()
df = pd.DataFrame( [[ij for ij in i] for i in rows] )
df.head()