I was trying to read one csv file using;
df= pd.read_csv('Diff_Report.csv',on_bad_lines='skip',encoding='cp1252',index_col=None)
Input Example
But the code outputs as in the following screenshot. Why is it happening like this?
Output
I was trying to read one csv file using;
df= pd.read_csv('Diff_Report.csv',on_bad_lines='skip',encoding='cp1252',index_col=None)
Input Example
But the code outputs as in the following screenshot. Why is it happening like this?
Output
@Ammu07
Try using pd.read_excel()
Solution 1: - It looks like you are displaying the first 5 rows of df2
Solution 2: - Check if it is in another encoding or just utf encoding.
Solution 3: - CSV files are separated by commas, but maybe your data contains a comma, which should be cleared.
Solution 4: - Check if your data is exactly like the input or if it is separated by commas.
Tip: - Try adding index_col as id.