How do I remove RangeIndex and dtypes from output display?

47 views Asked by At

OUTPUT DISPLAY- This is the output of my program project and only thing is remaining is that RangeIndex and dtypes values which I can't able to remoe from output display

SOURCE CODE- I are working on python project and narrow down the problem in my code which is below, you can see that between hello1 and hello2 and this the first 20 line of my code.

import sys
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_squared_error, r2_score
from sklearn.preprocessing import StandardScaler


def train_data():

    # Read data
    data = pd.read_csv("crop_csv_file_csv.csv");
    # Print column names to identify the correct target column name!
    print('hello1');
    data.head();
    data.head();
    data = data[:10000];
    data.head();
    data.info(verbose=False)
    print('hello2');

Following are the things, I tried -

1. data.to_csv(header=None,index=False)
2. data.to_csv(index=False)
3. data = pandas.read_csv('crop_csv_file_csv.csv', header=None)
4. tried to remove all 3 data.head() 

Whenever I tried the above things, no output is displayed and i get a blank display.

0

There are 0 answers