I am trying to learn python on my own to program some stock screeners. At the moment I am stumped. I am using output from AlphaVantage to get data on stock options. The problem is I keep getting page breaks in the output because the output is so, “wide.” Here is what I am getting (headers only, data omitted as it is not the problem)
contractID symbol expiration strike type last mark
bid bid_size ask ask_size volume open_interest date
implied_volatility delta gamma theta vega rho
I need it to look like this:
(Picture the headers all on one line as the screen here is not wide enough!)
contractID symbol expiration strike type last mark bid bid_size ask ask_size volume open_interest date implied_volatility delta gamma theta vega rho
I have tried:
data.replace(“\r”, " ")
but get “SyntaxError: unterminated string literal”
Thus I am assuming the "" is causing a carriage rerturn and needs to be removed but cannot seem to remove it!
What am I missing here? Am I just missing some syntax? Or am I using the wrong approach totally? Thanks in advance.