You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the query returns no results, the following Exception is thrown. This should result in returning an empty dataframe.
eland
>>> df2 = ed.read_es('localhost:9200', 'ecommerce')
>>> df2[df2['currency']=='USD']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/michael/projects/eland/eland/dataframe.py", line 273, in __repr__
line_width=width, show_dimensions=show_dimensions)
File "/Users/michael/projects/eland/eland/dataframe.py", line 662, in to_string
line_width=line_width)
File "/Users/michael/projects/eland/venv/lib/python3.7/site-packages/pandas/core/frame.py", line 759, in to_string
line_width=line_width,
File "/Users/michael/projects/eland/venv/lib/python3.7/site-packages/pandas/io/formats/format.py", line 502, in __init__
self._chk_truncate()
File "/Users/michael/projects/eland/venv/lib/python3.7/site-packages/pandas/io/formats/format.py", line 525, in _chk_truncate
n_add_rows = self.header + dot_row + show_dimension_rows + prompt_row
UnboundLocalError: local variable 'show_dimension_rows' referenced before assignment
Essentially, when we encounter an empty dataframe, we pass max_rows=0 over to pandas formatting. Since we handle printing dimensions in eland, we also initially pass show_dimensions=False. This combination results in unexpected behavior in pandas.
If the query returns no results, the following Exception is thrown. This should result in returning an empty dataframe.
eland
pandas
The text was updated successfully, but these errors were encountered: