Valueerror: if using all scalar values, you must pass an index

In this article let’s discuss about Valueerror: if using all scalar values, you must pass an index. Let’s go through the following methods without any delay 🙂

Method 1:

>>> df = pd.DataFrame({'A': a, 'B': b}, index=[0])
>>> df
   A  B
0  2  3

Method 2 :

ValueError: If using all scalar values, you must pass an indexWhatever By Drab Duck on Jun 5 2020
>>> df = pd.DataFrame({'A': a, 'B': b}, index=[0])
>>> df
   A  B
0  2  3

Hope the above methods works for you. Happy Learning and get back to us Anytime.

Realted Posts : Delphi asking for inpot via dialog box