Suppose I have a dataframe like this :Hospital_name    State    Employees    ......Fortis           Delhi    5000         ......AIIMS            Delhi    1000000      ......SuperSpeciality  Chennai  1000         ......Now I want to use this dataframe to build a machine learning model for predictive analysis. For that I must convert the strings to float values. Also some of these columns in Hospital_name and State contains 'NAN' values. In such a case how should I prepare my data for building a model in keras?   
String Values in a dataframe in Pandas
machine learning;python;data cleaning;pandas;keras
To convert from string to float in pandas(assuming you want to convert Employees and you loaded the dataframe with df), you can use df['Employees'].apply(lambda x:float(x))You have not given your enough information about your input and expected output. So let us assume that hospital name or anything for that matter which is the input for your model is nan, you would like to remove it from the dataset because extracting features from 'nan' wouldn't make sense. Apart from that if they are just other peripheral features, then it might be alright. In that case, if you wish to convert them into blank then use df.replace(np.nan,' ', regex=True). Else if you wish to remove that frame, you can check for nan using this.