Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Alex-Kopylov/119ac0180e7df944ed18f9c361f22582 to your computer and use it in GitHub Desktop.
Save Alex-Kopylov/119ac0180e7df944ed18f9c361f22582 to your computer and use it in GitHub Desktop.
def getSymbolBeforeDigit(x):
for i, c in enumerate(x):
if c.isdigit():
return x[i-1]
pd.to_numeric(data['Толщина_перед_смоткой'].apply(lambda x: x.split(getSymbolBeforeDigit(x))[1].replace(',','.')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment