Python Code For Data Preprocessing In R