Hindi_ASR / isNumber.py
cdactvm's picture
Upload 5 files
45f9ca7 verified
raw
history blame contribute delete
260 Bytes
#!/usr/bin/env python
# coding: utf-8
# In[ ]:
# Function to check if the string is a number
def is_number(x):
if type(x) == str:
x = x.replace(',', '')
try:
float(x)
except:
return False
return True