Jul-23-2020, 10:08 AM
Hello,
I have this data set with 11 columns:
Any help is appreciated.
I have this data set with 11 columns:
print(US_data)
Output: Real_Personal_Income ... Retail_Sales_ExFood_YY
Date ...
2000-01-31 10,856.0 ... -
2000-02-29 10,900.0 ... -
2000-03-31 10,929.0 ... -
2000-04-30 10,984.0 ... -
2000-05-31 11,022.0 ... -
... ... ... ...
2020-02-29 17,256.0 ... 4.4
2020-03-31 16,916.0 ... -2.6
2020-04-30 18,829.0 ... -15.3
2020-05-31 18,017.0 ... -1.1
2020-06-30 - ... 5.0
I'm trying to find/work out a function that can be used so that only the columns with 'YY' are returned. I assume it would be a if statement but I haven't been able to work it out.Any help is appreciated.