I have a pandas data frame with investment data. Two columns - Year and Amount. I want to filter this dataframe(and ultimately a graph of this dataframe) by the years input by the user.
For example the data frame has 50 rows, but I want the user to be able to select a number of years less than 50 to have the dataframe then only show the number of years the user inpput so that my graph only shows the years the user input.
TL;DR - Can I filter the number of rows shown in a dataframe based on a value input by the user?