You can basically set an alias for a module/class. If you remove as yf, you would need to write yfinance.download()
This is especially useful if you import a class which is some layers down like so: import x.y.z as z If you would not use the alias as, you would always need to reference z as x.y.z
I can only make an educated guess but I think OP just copied the non working code into a new file which he never executed. I can also see a `hello i am` in the terminal output but there is no 'print()' statement in the code.
6
u/[deleted] May 28 '25
Your ticker symbol is most likely wrong