I'm kind of a rookie in python so sorry in advance if I'll raise trivial questions.
I need to create a DataFrame from existing one. my new df will take input from the user and should return a specific new data frame. In my raw data, I have 5 columns of stock info : 'open', 'close', 'high', 'low' and 'volume', and a 'timestamp' column which I already converted to datetime properly.
my user is given the option to pick one or more of the 5 data columns (i.e 'open', 'close', 'high', 'low' and 'volume'), A ticker name and a range of preferable dates. ( I succeeded with the ticker name and the time) this is my output so far now i need to create a df that has another column - 'Data Type', that gets the request of the user, so my output shoud look, for instance, something like this:
timestamp ticker_name data type
2018-02-26 HP 67.35
2018-02-23 HP 701271
if the user asked to see only the 'open' and the 'volume' values of HP between
2018-02-23 to 2018-02-26 .
I've been struggling with this for Hours. any help will be highy appreciated! Thanks in advance!!