I have data like this:
I want to remove the rows in user ID_2 column which the data is more than and less than 5 digit
I have data like this:
I want to remove the rows in user ID_2 column which the data is more than and less than 5 digit
Select required column and check if value/10000 > 0 for more than 5 digit. Then replace that value with null or anything. Basically you are filtering data.
https://www.geeksforgeeks.org/python-filtering-data-with-pandas-query-method/
Since the question is
which the data is more than and less than 5 digit
Which means only 5 digits values are required, I slightly modified @ChrisA comment to fit the requirement:
df = pd.DataFrame({'userID': [20394756382,29304857203,20294857642,20293847564,20192837453],
'UserID2' : [38493,2212324,30498,30928,432]})
df = df.loc[df['UserID2'].astype(str).str.len().eq(5)]
print(df)
userID UserID2
0 20394756382 38493
2 20294857642 30498
3 20293847564 30928