taking a cue from @fuglede
pd.Series([x.count('$') for x in df.A.values.tolist()], df.index)
as @jezrael pointed out, the above fails when there is a null type, so ...
def tc(x): try: return x.count('$') except: return 0 pd.Series([tc(x) for x in df.A.values.tolist()], df.index)
timings
np.random.seed([3,1415]) df = pd.Series(np.random.randint(0, 100, 100000)) \ .apply(lambda x: '\$' * x).to_frame('A') df.A.replace('', np.nan, inplace=True) def tc(x): try: return x.count('$') except: return 0

source share