docs-isharkfly-com/python-tutorials/testx.py

17 lines
308 B
Python
Raw Normal View History

2020-09-30 14:31:20 -04:00
from decimal import Decimal, ROUND_HALF_UP, Context
import yfinance as yf
msft = yf.Ticker("MSFT")
msft.info
print(msft.dividends)
# print(round(2.3, 2))
# print(round(2.45, 1))
# print(round(2.675, 2))
#
# print(Decimal(1.325))
#
# print(Context(prec=3, rounding=ROUND_HALF_UP).create_decimal('2.675'))