Pls help me with the code

i want to perform if any cell in my data frame with characters(lowercase,uppercase),or any word then need to execute the below code .


above code has to execute if any cell with single characters or word or string…if any number present function need not to apply.
pls help me

Hi @saisaranv

It is not clear what you are trying to do with this code. So please reframe your query, and also try to share a reproducible code.

thanks for the response and i have the large data frame(data27) with numbers in one column and 112 columns having characters , now i have another data frame(data23) with characters in one column and another column with numbers.

so my idea is to replace a dataframe characters with numbers related to dataframe b.

just let me know if any ref needed.

As far as i can understood yuo want to replace values into one data frame from another.I have two data frames feat_df and mapping_tbl_df. i have done similar using below code, hope it helps:

df=sqldf(paste(‘select Code from mapping_tbl_df where Quality=’’,xval,’’’,sep=""))
print(‘df in AddCodesQuality’)
val <- as.character((df$Code))
return (val)

1 Like

May be you can loop over the data frame row by row and then by cell of that row and check when value of cell starts NA. This way you can achieve.

1 Like

thank u prakash but i am new to the coding part also…even no idea about the functions …so seeking for the help.