KnowledgeBoat Logo
|

Informatics Practices

Find the error in the following code fragments:

S = pd.Series(2, 3, 4, 55, index = range (4))

Python Data Handling

3 Likes

Answer

In the above code fragment, the data values should be enclosed in square brackets [] to form a list.

The corrected code is:

S = pd.Series([2, 3, 4, 55], index = range(4))

Answered By

1 Like


Related Questions