valueerror if using all scalar values you must pass an index from_dict code example
Example 1: ValueError: If using all scalar values, you must pass an index
>>> df = pd.DataFrame({'A': a, 'B': b}, index=[0])
>>> df
A B
0 2 3
Example 2: ValueError: If using all scalar values, you must pass an index
>>> df = pd.DataFrame({'A': [a], 'B': [b]})
>>> df
A B
0 2 3