The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Difference between data frame and variable in Python

Difference between data frame and variable in Python

0
Votes
1
Answer

Hi,
Which is the difference between defining a variable and a dataframe in Python? is it just the shape (since df will include an index)?

when w should opt for a data frame rather than a variable? and viceversa

1 Answer

365 Team
0
Votes

Hi Marta!
Thanks for reaching out.
А variable can contain a DataFrame.
variable is a placeholder/container for data values. 
Then, you can assign many types of objects to a certain variable. 
One type of object that you can assign to (and, thus, store in) a variable, is a pandas DataFrame.
Other objects that you can store in variables are pandas Series, lists, tuples, integers, string values and many others.
Hope this helps.
Best,
Martin