Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove whitespace from data frame

# importing library
import pandas as pd
 
# reading csv file and at a same time using skipinitial attribute which will remove extra space
df = pd.read_csv('student_data.csv', skipinitialspace = True)
 
# printing dataset
print(df)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #remove #whitespace #data #frame
ADD COMMENT
Topic
Name
3+6 =