pd.read_csv('ml-100k/u.item', sep='|', names=m_cols , encoding='latin-1')
Here is what the above code is Doing:
1. Reads the u.data file into a DataFrame called r_cols.
2. Splits the data on the tab character (‘\t’) and assigns the resulting columns to r_cols.
3. Reads the u.item file into a DataFrame called m_cols.
4. Splits the data on the pipe character (‘|’) and assigns the resulting columns to m_cols.