freecodecamp-pandas-real-life-example's People
Forkers
vertika-02 nicolaseyrolle michael-marron sunshinewalking lexipepsi estebanpozo sharonxloh brunohyoji eduardogarcial roulakm manepally-saikumar alexmccrossen nipanon liaquat85 sonacrystal sumeet-ranjan grayman1 luizformiga sogzi alej444 nh247 ijobson clinton117 jpclement anuragk8 sergeykoryagin samuel-john-ds swagatd valenciagino ntomeniko epoline yash-20 jshelton1836 maharshimodi98 afeldbusch tahsinnakibtalukder theirresistible samjanavandenbrink ioadlerer tekan-simon ceruya michealvanlockyer lannhinguyen tricksterjoe oluwafemiomitusa mauro-pinheiro tedmarov raghuvv pnordvik ibrah24 brahnir1 snowyyj91 gururajfullstackdev llcookj oldprofile-hash triblade2102 kthantsin smdwin qvisty kritikaasri greenrose2012 andyswisse dezzeh joceker dimatemnikov andreseleonr engineerkrutarth kaihkashan1 on21life rskiredj alessio6069 rosalina-das joebellamy wsdean94 thuong89 demet69 enzobj enochli5907 anji99-gif bidurkandel elbeebetron felixkaba johamunoz andykanu rohitmehta0 chisepo85 dben1 yohannestesfamichael gerasim971 primacipta laura144 dhuntzyo hauge92 rhlpaul adamfowliee grawhidemart zwstrain phunn1 boundary-conditions aillykkfreecodecamp-pandas-real-life-example's Issues
If you faced error in loading data in Exercise 1 using colab
The original code
sales = pd.read_csv( 'data/sales_data.csv', parse_dates=['Date'])
may cause error for you
then you can replace it with
sales = pd.read_csv( 'https://raw.githubusercontent.com/ine-rmotr-curriculum/FreeCodeCamp-Pandas-Real-Life-Example/master/data/sales_data.csv', parse_dates=['Date'])
And it worked well for me 💯
How to overcome issues loading data if using Google Colab?
Someone helpfully left a link in a different comment to load the data for Exercises_1. However, I don't know how they did it so I cannot replicate the solution for the lectures or Exercises_2.
Thanks for the assist.
Cannot read data file
Google colab issue
I cant seem to make this code run like the lecture video. Im not sure how to follow along the lesson with out the code .
I also get a warning when I try to run the file because this notebook is not authorized by google
This is the traceback I get on google colab when I click the play button on the 2nd line of code:
FileNotFoundError Traceback (most recent call last)
in ()
1 sales = pd.read_csv(
2 'data/sales_data.csv',
----> 3 parse_dates=['Date'])
4 frames
/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in init(self, src, **kwds)
1889 kwds["usecols"] = self.usecols
1890
-> 1891 self._reader = parsers.TextReader(src, **kwds)
1892 self.unnamed_cols = self._reader.unnamed_cols
1893
pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.cinit()
pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()
FileNotFoundError: [Errno 2] File data/sales_data.csv does not exist: 'data/sales_data.csv'
Google Colab
Hi, I'm trying to follow along using Google Colab but the data doesn't open - it says that there is no such file. How can I use the data used in these lectures to follow along? Please help me.
Exercise 1 incorrect code?
For the Question: How many sales with more than 500 in Revenue were made by men?
The answer given is: sales.loc[(sales['Customer_Gender'] == 'M') & (sales['Revenue'] == 500)].shape[0]
Question asks for MORE than 500. Shouldn't answer be: sales.loc[(sales['Customer_Gender'] == 'M') & (sales['Revenue'] >= 500)].shape[0]
How to download the exercises from Lecture 1 without downloading a zip.
I tried typing the code from the video in Google Colab and get this message "head: cannot open 'data/sales_data.csv' for reading: No such file or directory". In the issues, it seems that people need to download the zip and open it in VS Code. Is there a simpler way to do it? I want to use Google Colab, not VS Code. It would be helpful if we could actually download the datasets. These kinds of obstacles for beginners can be so frustrating - not being able to get past the first step (which should be simple) makes me want to give up lol.
Erro ai abrir exercício 1
Não consigo abrir o 1º exercício, comecei agora a estudar pela freecodecamp, e tem sido bem ruim a experiencia, preciso de ajuda com o seguinte erro.
Cell In[33], line 1
----> 1 sales = pd.read_csv(
2 'https://github.com/ine-rmotr-curriculum/FreeCodeCamp-Pandas-Real-Life-Example/blob/master/data/sales_data.csv',
3 parse_dates=['Date'])
NameError: name 'pd' is not defined
Google Spreadsheet for Lecture_1 taken down
seems like the spreadsheet has been taken down for violating google's terms of service. is there anyway to access the dataframe? I use jupyter
Unable to open database file
I am using jupyter notebooks on a MAC and I am unable to open the sakila database. Here is the error message that I got.
OperationalError Traceback (most recent call last)
Input In [6], in <cell line: 1>()
----> 1 conn = sqlite3.connect('data/sakila.db')
3 df = pd.read_sql('''
4 SELECT
5 rental.rental_id, rental.rental_date, rental.return_date,
(...)
19 ;
20 ''', conn, index_col='rental_id', parse_dates=['rental_date', 'return_date'])
OperationalError: unable to open database file
Error in loading data from the DWH in Exercise 2 using Colab
Anyone also experienced problems with loading data from the DWH using Colab?
The code:
`conn = sqlite3.connect('data/sakila.db')
df = pd.read_sql('''
SELECT
rental.rental_id, rental.rental_date, rental.return_date,
customer.last_name AS customer_lastname,
store.store_id,
city.city AS rental_store_city,
film.title AS film_title, film.rental_duration AS film_rental_duration,
film.rental_rate AS film_rental_rate, film.replacement_cost AS film_replacement_cost,
film.rating AS film_rating
FROM rental
INNER JOIN customer ON rental.customer_id == customer.customer_id
INNER JOIN inventory ON rental.inventory_id == inventory.inventory_id
INNER JOIN store ON inventory.store_id == store.store_id
INNER JOIN address ON store.address_id == address.address_id
INNER JOIN city ON address.city_id == city.city_id
INNER JOIN film ON inventory.film_id == film.film_id
;
''', conn, index_col='rental_id', parse_dates=['rental_date', 'return_date'])`
The error message:
OperationalError Traceback (most recent call last)
in ()
----> 1 conn = sqlite3.connect('data/sakila.db')
2
3 df = pd.read_sql('''
4 SELECT
5 rental.rental_id, rental.rental_date, rental.return_date,
OperationalError: unable to open database file---------------------------------------------------------------------------
Exercise 1: NameError: name 'sales' is not defined
I tried to run the stuff in the first three head information boxes on Noteable.io, having uploaded the csv file and all, yet the name sales is yet undefined.
NameError: name 'sales' is not defined
Why is this happening, may I ask? And how do I fix it?
Can't read data/sales_data.csv using panda library
When we run the code we encounter the following error
FileNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 sales = pd.read_csv(
2 'data/sales_data.csv',
3 parse_dates=['Date'])
6 frames
/usr/local/lib/python3.10/dist-packages/pandas/io/common.py in get_handle(path_or_buf, mode, encoding, compression, memory_map, is_text, errors, storage_options)
854 if ioargs.encoding and "b" not in ioargs.mode:
855 # Encoding
--> 856 handle = open(
857 handle,
858 ioargs.mode,
FileNotFoundError: [Errno 2] No such file or directory: 'data/sales_data.csv'
Exercises show answers before even finishing
Why is it that the exercises show you the answer before you even have a chance to figure it out?
i.e
box says '# your code goes here'
but immediately below it it shows you the exact answer to put in
Unable to download data/sales_data.csv
I am unable to download the working .csv data file to follow along in the tutorial. Does anyone else have the same issue?
Cannot load Exercises_1.ipynb or Exercises_2.ipynb
Hi
I've just started learning Data Analysis using Python from FreeCodeCamp.org. I am new to Githhub also, so bear with me!
I am using JupyterLab (v3.2.1) launched from Anaconda (v2.2.0) to load the exercises (since Notebook.ai mentioned in lectures is apparently shutting down). When I try to load Exercises_1.ipynb or Exercises_2.ipynb I get the following error:
File Load Error for Exercises_2.ipynb
Unreadable Notebook: C:\XXXXX\Exercises_2.ipynb NotJSONError("Notebook does not appear to be JSON: '\n\n\n\n\n\n\n\n<html la...")
I tried to search for a solution, but it appears to be beyond my skill set.
Can somebody help with this?
Thanks,
Shahid
practice
how do I open the practice files to work on them? every time I press open in GitHub desktop it just prompts me to download GitHub again
Lecture_2.ipynb has syntax error at [18] and [19]
It currently reads:
df['rental_gain_return'].mean().round(2)
df['rental_gain_return'].median().round(2)
but should be:
round(df['rental_gain_return'].mean(),2)
round(df['rental_gain_return'].median(),2)
Exercises_2.ipynb sql code cannot import data
Was getting this error, fixed it by swapping the / for a forward slash, or even deleting "data/" alltogether
OperationalError Traceback (most recent call last)
in ()
----> 1 conn = sqlite3.connect('data/sakila.db')
2
3 df = pd.read_sql('''
4 SELECT
5 rental.rental_id, rental.rental_date, rental.return_date,
OperationalError: unable to open database file
Now getting a new error - same error when I try using Mysql directly instead of Colab:
OperationalError: no such table: rental
Also in Mysql when I just use the SQL, seeing another error saying that the syntax around the SQL portion is incorrect.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '== customer.customer_id
INNER JOIN inventory ON rental.inventory_id == inven' at line 10
Can't figure this out to save my life.
Can't read data file and upload course file
this line not working in vs code
Interact
Cannot interact with page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.