Data Frame Exercise


I'm trying to write a simple app to append csv files. I'm going through the tutorial exercise with the following code:

import pandas as pd
data = [1,2,3,4,5]
df = pd.DataFrame(data)
print df

It's supposed to return 

0    1
1    2
2    3
3    4
4    5

However when I ran these lines it only returned


Empty DataFrame
Columns: []
Index: []

Process finished with exit code 0


Help is much appreciated!



1 comment
Comment actions Permalink

Hi Gary,

I've run your code sample and it returns what it should. Please provide the following data:

1. pandas version

2. Screenshot of your run configuration

3. Please try to run the same script file from the terminal, is there a difference in the output?


Please sign in to leave a comment.