I have a large csv file where I have filtered out the rows I want and created smaller more manageable data frames (called 'CL'). Each row has a Contract Month and Contract Year both in Int64 (I believe). I want to create a column combining the two in a date format (e.g., MM-YYYY) and having difficulty.
I have tried both extracting the columns to pandas series and converting to string
series.to_string
as well as the individual columns with
CL['CONTRACT MONTH']= CL['CONTRACT MONTH'].astype(str)
The latter method gives me a message "... SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead"
A little over my head with this (just learning Python) and was hoping for some help.