Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 使用項目符號進行切分
- def parse_info(row):
- if not 'sqft' in row:
- br, ba = row.split('')[:2]
- sqft = np.nan
- else:
- br, ba, sqft = row.split('.')[:3]
- return pd.Series({'Beds': br, 'Baths': ba, 'Sqft': sqft})
- attr = sucln['propertyinfo_value'].apply(parse_info)
- attr
Advertisement
Add Comment
Please, Sign In to add comment