I've seen some similar problems on stack, but not exactly like this. I appreciate if you could share a way to turn df into df2.
df = pd.DataFrame({'zips': ['11229 11226 11225', '90291 90293 90292'],
'lat': [40.6943, 34.1139],
'lng': [-73.9249, -118.4068]})
df2 = pd.DataFrame({'zips': [11229, 11226, 11225, 90291, 90293, 90292],
'lat': [40.6943, 40.6943, 40.6943, 34.1139, 34.1139, 34.1139],
'lng': [-73.9249, -73.9249, -73.9249, -118.4068, -118.4068, -118.4068]})```
Thanks!
splitand thenexplode:df.assign(zips = df.zips.str.split(' ')).explode('zips')