If else with lambda
calls_final.calls_tw=calls_final.calls_tw.map(lambda x: x if np.isfinite(x) else 0)