diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index ed372196..5322b37a 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,23 @@
Change Log
===========
+0.2.46
+------
+Fix regression in 0.2.45 #2094
+
+0.2.45
+------
+Features:
+- Screener #2066 @ericpien
+Fixes
+- Tickers keyerror #2068 @antoniouaa
+- IndexError in some history() debug messages #2087
+- improve dividend repair #2090
+Maintenance
+- fix unit tests contextual imports #2067
+- fix typos #2072 @algonell
+- add Pyright type checking #2059 @marco-carvalho
+
0.2.44
------
Features:
diff --git a/README.md b/README.md
index c2d288cb..d631bdf5 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,6 @@ Yahoo! finance API is intended for personal use only.**
-
@@ -376,6 +375,6 @@ details on your rights to use the actual data downloaded.
### P.S.
-Please drop me an note with any feedback you have.
+Please drop me a note with any feedback you have.
**Ran Aroussi**
diff --git a/meta.yaml b/meta.yaml
index c7bbfa9f..5a828d1b 100644
--- a/meta.yaml
+++ b/meta.yaml
@@ -1,5 +1,5 @@
{% set name = "yfinance" %}
-{% set version = "0.2.44" %}
+{% set version = "0.2.46" %}
package:
name: "{{ name|lower }}"
diff --git a/yfinance/multi.py b/yfinance/multi.py
index d611b7b0..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):
+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,6 +86,8 @@ 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
+ multi_level_index: bool
+ Optional. Always return a MultiIndex DataFrame? Default is False
"""
logger = utils.get_yf_logger()
@@ -215,6 +218,9 @@ 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 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
diff --git a/yfinance/screener/screener.py b/yfinance/screener/screener.py
index cdb6e667..2d35968e 100644
--- a/yfinance/screener/screener.py
+++ b/yfinance/screener/screener.py
@@ -98,8 +98,8 @@ def _fetch_and_parse(self) -> None:
self._response = response['finance']['result'][0]
except Exception as e:
logger = utils.get_yf_logger()
- logger.error(f"Failed to get screener data for '{self._body.get('query', "query not set")}' reason: {e}")
+ logger.error(f"Failed to get screener data for '{self._body.get('query', 'query not set')}' reason: {e}")
logger.debug("Got response: ")
logger.debug("-------------")
logger.debug(f" {response}")
- logger.debug("-------------")
\ No newline at end of file
+ logger.debug("-------------")
diff --git a/yfinance/version.py b/yfinance/version.py
index 36448d88..31fd36d2 100644
--- a/yfinance/version.py
+++ b/yfinance/version.py
@@ -1 +1 @@
-version = "0.2.44"
+version = "0.2.48"