如何筛选掉首字母为“6”的记录,其他位置有“6”的保留?
假定你用的 pandas.DataFrame
df = pd.DataFrame({'型号': ['600769', '6x34', '689', 'b666']}) df[~df['型号'].str.startswith('6')]
2.1m questions
2.1m answers
63 comments
56.6k users