I understand this is trying to teach using lists for iteration. Would it not be better to teach how to clean data, input information properly into a database, and then iterate on that information?
I don’t know in what track you are and in what sequence you are following the courses/ missions at DataQuest.
But this mission is under fundamentals, absolute basics. So SQLite and MySql would also be considered as advance courses for beginners. You may have experience with them, but this mission caters to people who are just getting introduced to Python.
the course content explains it well but I will just try so that you get an idea:
x = 6 this is variable x of type int (integer) pi_val = 3.14 this is variable pi_val of type float course = "python" this is variable course of type str (string)
combo = [x, pi_val, course ] this is variable combo of type List (the one this mission talks about)
the row here is not the SQLite table row, it’s just the variable named “row1”, “row2”, etc.
Maybe I am confusing something from excel / possibly a pivot table and am wanting to substitute using a database to store information. Can you link me to those missions?
It’s my assumption you are mixing up multiple concepts here. Most likely mixing up simple things from one tech with complex topics you are currently learning or already know about another tech.
Anyhow, of course, when we have to deal with a large amount of data, best structures would be database tables. But then it’s not just storage, we will have to deal with then, it’s also the complexity these structures have and the simple/ complex queries we will have to create in order to extract/ use the stored information!
This really does not go with this topic on the forum. I am trying scrape data into Jupyter notebook and then have that data go into a back-end database.
Hello, everyone! This is a question about list slicing. It seems simple, but i just don’t understand. When you are slicing a list, why does the final number have to be N+1?
as in: a_list = [2,4]
but you want the third number on the list as the last one? Im confused about this.
I may not be helping you at all with this. But my confusion was this: in the real world, when is it actually practical to store an entire row of a table in a list? Is it not better to store information so each row has a name and each column has a name? That was really all I was getting at.
I still don’t know how much this will help you, but let us say you are working with a table which has only 4 columns and 5 rows.
Are you sure you want to log in to a database, create a table, store these rows, and every time you need them - you will make a connection with the database, fetch the query, store the query result somewhere (assuming you are working with SQL and Python together) close the connection and work on your fetched results thereafter? Every time!?
Or while working on such a small number of records you would prefer a small structure that can be created once and modified or updated during the workflow.?
I am new in Phyton and recently I found a weird case.
I cannot print the result after I created the list and record them in variables.
Anyway, I am already in Step 6, between Step 1-Step 5, I can print the result.
After step 6, I try to do trial and error to solve the problem. However, when I got this error in step 6 :TypeError: ‘list’ object is not callable
Then, I reset my progress, and come back again to Step 1
Now, The print function is screwed up and I cannot print my result. Here is the error: