diff --git a/yfinance/multi.py b/yfinance/multi.py index 4150df71..5a063050 100644 --- a/yfinance/multi.py +++ b/yfinance/multi.py @@ -34,10 +34,11 @@ @utils.log_indent_decorator -def download(tickers, start=None, end=None, actions=False, threads=True, ignore_tz=None, - group_by='column', auto_adjust=False, back_adjust=False, repair=False, keepna=False, - progress=True, period="max", interval="1d", prepost=False, - proxy=None, rounding=False, timeout=10, session=None, return_multi_index=True): +def download(tickers, start=None, end=None, actions=False, threads=True, + ignore_tz=None, group_by='column', auto_adjust=False, back_adjust=False, + repair=False, keepna=False, progress=True, period="max", interval="1d", + prepost=False, proxy=None, rounding=False, timeout=10, session=None, + multi_level_index=True): """Download yahoo tickers :Parameters: tickers : str, list @@ -85,7 +86,7 @@ def download(tickers, start=None, end=None, actions=False, threads=True, ignore_ seconds. (Can also be a fraction of a second e.g. 0.01) session: None or Session Optional. Pass your own session object to be used for all requests - return_multi_index: bool + multi_level_index: bool Optional. Always return a MultiIndex DataFrame? Default is False """ logger = utils.get_yf_logger() @@ -217,7 +218,7 @@ def download(tickers, start=None, end=None, actions=False, threads=True, ignore_ data.columns = data.columns.swaplevel(0, 1) data.sort_index(level=0, axis=1, inplace=True) - if not return_multi_index and len(tickers) == 1: + if not multi_level_index and len(tickers) == 1: data = data.droplevel(0 if group_by == 'ticker' else 1, axis=1).rename_axis(None, axis=1) return data