Logo ao passar o comando
<<< moedas = pd.DataFrame(eventos) >>>
aparece o seguinte erro:
<<< ValueError: If using all scalar values, you must pass an index >>>
Segue a íntegra:
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_11792/1873320373.py in <module>
4 'm4': m4,
5 'm5': m5}
----> 6 moedas = pd.DataFrame(eventos)
7 moedas
~\anaconda3\lib\site-packages\pandas\core\frame.py in __init__(self, data, index, columns, dtype, copy)
612 elif isinstance(data, dict):
613 # GH#38939 de facto copy defaults to False only in non-dict cases
--> 614 mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
615 elif isinstance(data, ma.MaskedArray):
616 import numpy.ma.mrecords as mrecords
~\anaconda3\lib\site-packages\pandas\core\internals\construction.py in dict_to_mgr(data, index, columns, dtype, typ, copy)
462 # TODO: can we get rid of the dt64tz special case above?
463
--> 464 return arrays_to_mgr(
465 arrays, data_names, index, columns, dtype=dtype, typ=typ, consolidate=copy
466 )
~\anaconda3\lib\site-packages\pandas\core\internals\construction.py in arrays_to_mgr(arrays, arr_names, index, columns, dtype, verify_integrity, typ, consolidate)
117 # figure out the index, if necessary
118 if index is None:
--> 119 index = _extract_index(arrays)
120 else:
121 index = ensure_index(index)
~\anaconda3\lib\site-packages\pandas\core\internals\construction.py in _extract_index(data)
623
624 if not indexes and not raw_lengths:
--> 625 raise ValueError("If using all scalar values, you must pass an index")
626
627 if have_series:
ValueError: If using all scalar values, you must pass an index