Snippets Collections
"Good night".replace("night", "day")
// "Good day"

// some with ignoreCase
"Good night".replace("night", "day", true)
// true mean ignoreCase=true
for c in df_drop.columns:
    df_drop[c] = df_drop[c].str.replace('[^\w\s]+', '')
df_drop = df_drop.astype(str)
df_drop.head()
star

Sun Nov 03 2024 22:04:58 GMT+0000 (Coordinated Universal Time)

#replace #stringconversion #ignorecase
star

Tue Jun 29 2021 19:02:21 GMT+0000 (Coordinated Universal Time)

#py #dataframe #pandas #replace

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension