0
我有一些记录看起来像这样的一个DF:清洁CSS样式块从熊猫数据框中
Untitledp { margin-top: 0px;margin-bottom: 0px;line-height: 1.15; } body { font-family: 'Times New Roman';font-style: Normal;font-weight: normal;font-size: 13.3333333333333px; } .Normal { telerik-style-type: paragraph;telerik-style-name: Normal;border-collapse: collapse; } .TableNormal { telerik-style-type: table;telerik-style-name: TableNormal;border-collapse: collapse; } .s_F0039783 { telerik-style-type: local;font-size: 13.34px; } .s_45EBF2E0 { telerik-style-type: local;font-family: 'Times New Roman';font-size: 13.3333333333333px;color: #000000; } A sentence that I actually want.
我想删除的CSS样式块,只在最后返回的句子。每个记录的CSS块数量可能不同。所有记录都以“Untitledp”开头,并以我想要的文本结尾(文本后没有样式块)。
我应该如何清洁这些块?我使用BeautifulSoup
来清理html标签,但它不适用于这些块。