Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 yfinance 获得市盈率。
import yfinance as yf symbol = yf.Ticker('msft').info print(symbol['pe_ratio'])
两个可用的yfinance是trailingPE和forwardPE。要获得它们:
yfinance
trailingPE
forwardPE
import yfinance as yf symbol = yf.Ticker("msft").info symbol["trailingPE"] symbol["forwardPE"]