Data Analysis with Python - Jupyter Notebooks Cells

Tell us what’s happening:

i am having difficulties setting up my google colab, when i hit enter it doesn’t execute the code

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge Information:

Data Analysis with Python - Jupyter Notebooks Cells

Ctrl + Enter will execute a cell (or the play button in the upper left corner)

Are you getting any errors?


NameError Traceback (most recent call last)
in <cell line: 1>()
----> 1 sales[‘Customer_Age’].mean()

NameError: name ‘sales’ is not defined

name ‘sales’ is not defined

Do you have a variable called sales with some data in it?

Can you post your code here please?

sales = pd.read_csv(
‘data/sales_data.csv’,
parse_dates=[‘Date’])

This error suggests that the ‘sales’ DataFrame has not been defined in the current scope.

import pandas as pd

sales = pd.read_csv('data/sales_data.csv', parse_dates=['Date'])
sales['Customer_Age'].mean()

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.