chore(i8n,learn): processed translations

This commit is contained in:
Crowdin Bot
2021-02-06 04:42:36 +00:00
committed by Mrugesh Mohapatra
parent 15047f2d90
commit e5c44a3ae5
3274 changed files with 172122 additions and 14164 deletions

View File

@ -0,0 +1,43 @@
---
id: 5e9a093a74c4063ca6f7c14d
title: Data Analysis Example A
challengeType: 11
videoId: nVAaxZ34khk
dashedName: data-analysis-example-a
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/FreeCodeCamp-Pandas-Real-Life-Example)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What does the shape of our dataframe tell us?
## --answers--
The size in gigabytes the dataframe we loaded into memory is.
---
How many rows and columns our dataframe has.
---
How many rows the source data had before loading.
---
How many columns the source data had before loading.
## --video-solution--
2

View File

@ -0,0 +1,39 @@
---
id: 5e9a093a74c4063ca6f7c14e
title: Data Analysis Example B
challengeType: 11
videoId: 0kJz0q0pvgQ
dashedName: data-analysis-example-b
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/FreeCodeCamp-Pandas-Real-Life-Example)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What does the `loc` method allow you to do?
## --answers--
Retrieve a subset of rows and columns by supplying integer-location arguments.
---
Access a group of rows and columns by supplying label(s) arguments.
---
Returns the first `n` rows based on the integer argument supplied.
## --video-solution--
2

View File

@ -0,0 +1,43 @@
---
id: 5e9a093a74c4063ca6f7c160
title: Data Cleaning and Visualizations
challengeType: 11
videoId: mHjxzFS5_Z0
dashedName: data-cleaning-and-visualizations
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/data-cleaning-rmotr-freecodecamp)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
When using Matplotlib's global API, what does the order of numbers mean here?
```py
plt.subplot(1, 2, 1)
```
## --answers--
My figure will have one column, two rows, and I am going to start drawing in the first (left) plot.
---
I am going to start drawing in the first (left) plot, my figure will have two rows, and my figure will have one column.
---
My figure will have one row, two columns, and I am going to start drawing in the first (left) plot.
## --video-solution--
3

View File

@ -0,0 +1,39 @@
---
id: 5e9a093a74c4063ca6f7c15f
title: Data Cleaning Duplicates
challengeType: 11
videoId: kj7QqjXhH6A
dashedName: data-cleaning-duplicates
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/data-cleaning-rmotr-freecodecamp)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
The Python method `.duplicated()` returns a boolean Series for your DataFrame. `True` is the return value for rows that:
## --answers--
contain a duplicate, where the value for the row contains the first occurrence of that value.
---
contain a duplicate, where the value for the row is at least the second occurrence of that value.
---
contain a duplicate, where the value for the row contains either the first or second occurrence.
## --video-solution--
2

View File

@ -0,0 +1,58 @@
---
id: 5e9a093a74c4063ca6f7c15d
title: Data Cleaning Introduction
challengeType: 11
videoId: ovYNhnltVxY
dashedName: data-cleaning-introduction
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/data-cleaning-rmotr-freecodecamp)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
import pandas as pd
import numpy as np
s = pd.Series(['a', 3, np.nan, 1, np.nan])
print(s.notnull().sum())
```
## --answers--
3
---
<pre>0 True
1 True
2 False
3 True
4 False
dtype: bool</pre>
---
<pre>0 False
1 False
2 True
3 False
4 True
dtype: bool</pre>
## --video-solution--
1

View File

@ -0,0 +1,70 @@
---
id: 5e9a093a74c4063ca6f7c15e
title: Data Cleaning with DataFrames
challengeType: 11
videoId: sTMN_pdI6S0
dashedName: data-cleaning-with-dataframes
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/data-cleaning-rmotr-freecodecamp)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
import pandas as pd
import numpy as np
s = pd.Series([np.nan, 1, 2, np.nan, 3])
s = s.fillna(method='ffill')
print(s)
```
## --answers--
<pre>
0 1.0
1 1.0
2 2.0
3 3.0
4 3.0
dtype: float64
</pre>
---
<pre>
0 NaN
1 1.0
2 2.0
3 2.0
4 3.0
dtype: float64
</pre>
---
<pre>
0 NaN
1 1.0
2 2.0
3 NaN
4 3.0
dtype: float64
</pre>
## --video-solution--
2

View File

@ -0,0 +1,40 @@
---
id: 5e9a093a74c4063ca6f7c14f
title: How to use Jupyter Notebooks Intro
challengeType: 11
videoId: h8caJq2Bb9w
dashedName: how-to-use-jupyter-notebooks-intro
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
- [Twitter Cheat Sheet](https://twitter.com/rmotr_com/status/1122176794696847361)
# --question--
## --text--
What is **not** allowed in a Jupyter Notebook's cell?
## --answers--
Markdown
---
Python code
---
An Excel sheet
## --video-solution--
3

View File

@ -0,0 +1,40 @@
---
id: 5e9a093a74c4063ca6f7c14c
title: Introduction to Data Analysis
challengeType: 11
videoId: VJrP2FUzKP0
dashedName: introduction-to-data-analysis
---
# --description--
More resources:
\- [Slides](https://docs.google.com/presentation/d/1fDpjlyMiOMJyuc7_jMekcYLPP2XlSl1eWw9F7yE7byk)
# --question--
## --text--
Why should you choose R over Python for data analysis?
## --answers--
It's simple to learn.
---
It's better at dealing with advanced statistical methods.
---
There are many powerful libraries that support R.
---
It's free and open source.
## --video-solution--
2

View File

@ -0,0 +1,39 @@
---
id: 5e9a093a74c4063ca6f7c150
title: Jupyter Notebooks Cells
challengeType: 11
videoId: 5PPegAs9aLA
dashedName: jupyter-notebooks-cells
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
- [Twitter Cheat Sheet](https://twitter.com/rmotr_com/status/1122176794696847361)
# --question--
## --text--
What are the three main types of Jupyter Notebook Cell?
## --answers--
Code, Markdown, and Python
---
Code, Markdown, and Raw
---
Markdown, Python, and Raw
## --video-solution--
2

View File

@ -0,0 +1,48 @@
---
id: 5e9a093a74c4063ca6f7c151
title: Jupyter Notebooks Importing and Exporting Data
challengeType: 11
videoId: k1msxD3JIxE
dashedName: jupyter-notebooks-importing-and-exporting-data
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/ds-content-interactive-jupyterlab-tutorial)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
- [Twitter Cheat Sheet](https://twitter.com/rmotr_com/status/1122176794696847361)
# --question--
## --text--
What kind of data can you import and work with in a Jupyter Notebook?
## --answers--
Excel files.
---
CSV files.
---
XML files.
---
Data from an API.
---
All of the above.
## --video-solution--
5

View File

@ -0,0 +1,43 @@
---
id: 5e9a093a74c4063ca6f7c157
title: Numpy Algebra and Size
challengeType: 11
videoId: XAT97YLOKD8
dashedName: numpy-algebra-and-size
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-numpy)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What is the relationship between size of objects (such as lists and datatypes) in memory in Python's standard library and the NumPy library? Knowing this, what are the implications for performance?
## --answers--
Standard Python objects take up much more memory to store than NumPy objects; operations on comparable standard Python and NumPy objects complete in roughly the same time.
---
NumPy objects take up much more memory than standard Python objects; operations on NumPy objects complete very quickly compared to comparable objects in standard Python.
---
NumPy objects take up much less memory than Standard Python objects; operations on Standard Python objects complete very quickly compared to comparable objects on NumPy Object.
---
Standard Python objects take up more memory than NumPy objects; operations on NumPy objects complete very quickly compared to comparable objects in standard Python.
## --video-solution--
4

View File

@ -0,0 +1,59 @@
---
id: 5e9a093a74c4063ca6f7c154
title: Numpy Arrays
challengeType: 11
videoId: VDYVFHBL1AM
dashedName: numpy-arrays
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-numpy)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
A = np.array([
['a', 'b', 'c'],
['d', 'e', 'f'],
['g', 'h', 'i']
])
print(A[:, :2])
```
## --answers--
```py
[['a' 'b']]
```
---
```py
[['b' 'c']
['e' 'f']
['h' 'i']]
```
---
```py
[['a' 'b']
['d' 'e']
['g' 'h']]
```
## --video-solution--
3

View File

@ -0,0 +1,57 @@
---
id: 5e9a093a74c4063ca6f7c156
title: Numpy Boolean Arrays
challengeType: 11
videoId: N1ttsMmcVMM
dashedName: numpy-boolean-arrays
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-numpy)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
a = np.arange(5)
print(a <= 3)
```
## --answers--
```python
[False, False, False, False, True]
```
---
```python
[5]
```
---
```python
[0, 1, 2, 3]
```
---
```python
[True, True, True, True, False]
```
## --video-solution--
4

View File

@ -0,0 +1,39 @@
---
id: 5e9a093a74c4063ca6f7c152
title: Numpy Introduction A
challengeType: 11
videoId: P-JjV6GBCmk
dashedName: numpy-introduction-a
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-numpy)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
Why is Numpy an important, but unpopular Python library?
## --answers--
Often you won't work directly with Numpy.
---
It is extremely slow.
---
Working with Numpy is difficult.
## --video-solution--
1

View File

@ -0,0 +1,43 @@
---
id: 5e9a093a74c4063ca6f7c153
title: Numpy Introduction B
challengeType: 11
videoId: YIqgrNLAZkA
dashedName: numpy-introduction-b
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-numpy)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
About how much memory does the integer `5` consume in plain Python?
## --answers--
32 bits
---
20 bytes
---
16 bytes
---
8 bits
## --video-solution--
2

View File

@ -0,0 +1,50 @@
---
id: 5e9a093a74c4063ca6f7c155
title: Numpy Operations
challengeType: 11
videoId: eqSVcJbaPdk
dashedName: numpy-operations
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-numpy)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What is the value of `a` after you run the following code?
```py
a = np.arange(5)
a + 20
```
## --answers--
```python
[20, 21, 22, 24, 24]
```
---
```python
[0, 1, 2, 3, 4]
```
---
```python
[25, 26, 27, 28, 29]
```
## --video-solution--
2

View File

@ -0,0 +1,73 @@
---
id: 5e9a093a74c4063ca6f7c15b
title: Pandas Conditional Selection and Modifying DataFrames
challengeType: 11
videoId: BFlH0fN5xRQ
dashedName: pandas-conditional-selection-and-modifying-dataframes
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
import pandas as pd
certificates_earned = pd.DataFrame({
'Certificates': [8, 2, 5, 6],
'Time (in months)': [16, 5, 9, 12]
})
names = ['Tom', 'Kris', 'Ahmad', 'Beau']
certificates_earned.index = names
longest_streak = pd.Series([13, 11, 9, 7], index=names)
certificates_earned['Longest streak'] = longest_streak
print(certificates_earned)
```
## --answers--
<pre>
Tom 13
Kris 11
Ahmad 9
Beau 7
Name: Longest streak, dtype: int64
</pre>
---
<pre>
Certificates Time (in months) Longest streak
Tom 8 16 13
Kris 2 5 11
Ahmad 5 9 9
Beau 6 12 7
</pre>
---
<pre>
Certificates Longest streak
Tom 8 13
Kris 2 11
Ahmad 5 9
Beau 6 7
</pre>
## --video-solution--
2

View File

@ -0,0 +1,58 @@
---
id: 5e9a093a74c4063ca6f7c15c
title: Pandas Creating Columns
challengeType: 11
videoId: _sSo2XZoB3E
dashedName: pandas-creating-columns
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What code would add a "Certificates per month" column to the `certificates_earned` DataFrame like the one below?
<pre> Certificates Time (in months) Certificates per month
Tom 8 16 0.50
Kris 2 5 0.40
Ahmad 5 9 0.56
Beau 6 12 0.50</pre>
## --answers--
```py
certificates_earned['Certificates'] /
certificates_earned['Time (in months)']
```
---
```py
certificates_earned['Certificates per month'] = round(
certificates_earned['Certificates'] /
certificates_earned['Time (in months)']
)
```
---
```py
certificates_earned['Certificates per month'] = round(
certificates_earned['Certificates'] /
certificates_earned['Time (in months)'], 2
)
```
## --video-solution--
3

View File

@ -0,0 +1,66 @@
---
id: 5e9a093a74c4063ca6f7c15a
title: Pandas DataFrames
challengeType: 11
videoId: 7SgFBYXaiH0
dashedName: pandas-dataframes
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
import pandas as pd
certificates_earned = pd.DataFrame({
'Certificates': [8, 2, 5, 6],
'Time (in months)': [16, 5, 9, 12]
})
certificates_earned.index = ['Tom', 'Kris', 'Ahmad', 'Beau']
print(certificates_earned.iloc[2])
```
## --answers--
<pre>
Tom 16
Kris 5
Ahmad 9
Beau 12
Name: Time (in months), dtype: int64
</pre>
---
<pre>
Certificates 6
Time (in months) 12
Name: Beau, dtype: int64
</pre>
---
<pre>
Certificates 5
Time (in months) 9
Name: Ahmad, dtype: int64
</pre>
## --video-solution--
3

View File

@ -0,0 +1,65 @@
---
id: 5e9a093a74c4063ca6f7c159
title: Pandas Indexing and Conditional Selection
challengeType: 11
videoId: '-ZOrgV_aA9A'
dashedName: pandas-indexing-and-conditional-selection
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
import pandas as pd
certificates_earned = pd.Series(
[8, 2, 5, 6],
index=['Tom', 'Kris', 'Ahmad', 'Beau']
)
print(certificates_earned[certificates_earned > 5])
```
## --answers--
<pre>
Tom True
Kris False
Ahmad False
Beau True
dtype: int64
</pre>
---
<pre>
Tom 8
Ahmad 5
Beau 6
dtype: int64
</pre>
---
<pre>
Tom 8
Beau 6
dtype: int64
</pre>
## --video-solution--
3

View File

@ -0,0 +1,68 @@
---
id: 5e9a093a74c4063ca6f7c158
title: Pandas Introduction
challengeType: 11
videoId: 0xACW-8cZU0
dashedName: pandas-introduction
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/freecodecamp-intro-to-pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What will the following code print out?
```py
import pandas as pd
certificates_earned = pd.Series(
[8, 2, 5, 6],
index=['Tom', 'Kris', 'Ahmad', 'Beau']
)
print(certificates_earned)
```
## --answers--
```
Tom 8
Kris 2
Ahmad 5
Beau 6
dtype: int64
```
---
```
Kris 2
Ahmad 5
Beau 6
Tom 8
dtype: int64
```
---
```
Tom 8
Kris 2
Ahmad 5
Beau 6
Name: certificates_earned dtype: int64
```
## --video-solution--
1

View File

@ -0,0 +1,43 @@
---
id: 5e9a093a74c4063ca6f7c164
title: Parsing HTML and Saving Data
challengeType: 11
videoId: bJaqnTWQmb0
dashedName: parsing-html-and-saving-data
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What Python library has the `.read_html()` method we can we use for parsing HTML documents and extracting tables?
## --answers--
BeautifierSoupy
---
WebReader
---
HTTP-master
---
Pandas
## --video-solution--
4

View File

@ -0,0 +1,39 @@
---
id: 5e9a093a74c4063ca6f7c166
title: Python Functions and Collections
challengeType: 11
videoId: NzpU17ZVlUw
dashedName: python-functions-and-collections
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/ds-content-python-under-10-minutes)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What is the main difference between lists and tuples in Python?
## --answers--
Tuples are immutable.
---
Lists are ordered.
---
Tuples are unordered.
## --video-solution--
1

View File

@ -0,0 +1,43 @@
---
id: 5e9a093a74c4063ca6f7c165
title: Python Introduction
challengeType: 11
videoId: PrQV9JkLhb4
dashedName: python-introduction
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/ds-content-python-under-10-minutes)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
How do we define blocks of code in the body of functions in Python?
## --answers--
We use a set of curly braces, one on either side of each new block of our code.
---
We use indentation, usually right-aligned 4 spaces.
---
We do not denote blocks of code.
---
We could use curly braces or indentation to denote blocks of code.
## --video-solution--
2

View File

@ -0,0 +1,56 @@
---
id: 5e9a093a74c4063ca6f7c167
title: Python Iteration and Modules
challengeType: 11
videoId: XzosGWLafrY
dashedName: python-iteration-and-modules
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/ds-content-python-under-10-minutes)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
How would you iterate over and print the keys and values of a dictionary named `user`?
## --answers--
```python
for key in user.items():
print(key)
```
---
```python
for key, value in user.all():
print(key, value)
print(value)
```
---
```python
for key, value in user.items():
print(key, value)
```
---
```python
for key, value in user
print(key, value)
```
## --video-solution--
3

View File

@ -0,0 +1,55 @@
---
id: 5e9a093a74c4063ca6f7c162
title: Reading Data CSV and TXT
challengeType: 11
videoId: ViGEv0zOzUk
dashedName: reading-data-csv-and-txt
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
How would you import the CSV file `data.csv` and store it in a DataFrame using the Pandas module?
## --answers--
```python
import pandas as pd
df = pd.csv("data.csv")
```
---
```python
import pandas as pd
df = pd.read_csv("data.csv")
```
---
```python
import pandas as pd
pd.read_csv("data.csv")
```
---
```python
import pandas as pd
df = pd.csv_reader("data.csv")
```
## --video-solution--
2

View File

@ -0,0 +1,39 @@
---
id: 5e9a093a74c4063ca6f7c163
title: Reading Data from Databases
challengeType: 11
videoId: MtgXS1MofRw
dashedName: reading-data-from-databases
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
What method does a `Cursor` instance have and what does it allow?
## --answers--
The `Cursor` instance has a `.run()` method which allows you to run SQL queries.
---
The `Cursor` instance has a `.select()` method which allows you to select records.
---
The `Cursor` instance has an `.execute()` method which will receive SQL parameters to run against the database.
## --video-solution--
3

View File

@ -0,0 +1,72 @@
---
id: 5e9a093a74c4063ca6f7c161
title: Reading Data Introduction
challengeType: 11
videoId: cDnt02BcHng
dashedName: reading-data-introduction
---
# --description--
*Instead of using notebooks.ai like it shows in the video, you can use Google Colab instead.*
More resources:
- [Notebooks on GitHub](https://github.com/ine-rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas)
- [How to open Notebooks from GitHub using Google Colab.](https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb)
# --question--
## --text--
Given a file named `certificates.csv` with these contents:
<pre>
Name$Certificates$Time (in months)
Tom$8$16
Kris$2$5
Ahmad$5$9
Beau$6$12
</pre>
Fill in the blanks for the missing arguments below:
```py
import csv
with open(__A__, 'r') as fp:
reader = csv.reader(fp, delimiter=__B__)
next(reader)
for index, values in enumerate(reader):
name, certs_num, months_num = values
print(f"{name} earned {__C__} certificates in {months_num} months")
```
## --answers--
A: `'certificates.csv'`
B: `'-'`
C: `values`
---
A: `'certificates.csv'`
B: `'$'`
C: `certs_num`
---
A: `'certificates'`
B: `'$'`
C: `certs_num`
## --video-solution--
2

View File

@ -0,0 +1,32 @@
---
id: 5e46f7e5ac417301a38fb929
title: Demographic Data Analyzer
challengeType: 10
dashedName: demographic-data-analyzer
---
# --description--
In this challenge you must analyze demographic data using Pandas. You are given a dataset of demographic data that was extracted from the 1994 Census database.
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-demographic-data-analyzer).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the data analysis with Python curriculum. For now, you will have to use other resources to learn how to pass this challenge.
# --hints--
It should pass all Python tests.
```js
```
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```

View File

@ -0,0 +1,32 @@
---
id: 5e46f7e5ac417301a38fb928
title: Mean-Variance-Standard Deviation Calculator
challengeType: 10
dashedName: mean-variance-standard-deviation-calculator
---
# --description--
Create a function that uses Numpy to output the mean, variance, and standard deviation of the rows, columns, and elements in a 3 x 3 matrix.
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-mean-variance-standard-deviation-calculator).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the data analysis with Python curriculum. For now, you will have to use other resources to learn how to pass this challenge.
# --hints--
It should pass all Python tests.
```js
```
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```

View File

@ -0,0 +1,32 @@
---
id: 5e46f7f8ac417301a38fb92a
title: Medical Data Visualizer
challengeType: 10
dashedName: medical-data-visualizer
---
# --description--
In this project, you will visualize and make calculations from medical examination data using matplotlib, seaborn, and pandas.
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-medical-data-visualizer).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the data analysis with Python curriculum. For now, you will have to use other resources to learn how to pass this challenge.
# --hints--
It should pass all Python tests.
```js
```
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```

View File

@ -0,0 +1,32 @@
---
id: 5e46f802ac417301a38fb92b
title: Page View Time Series Visualizer
challengeType: 10
dashedName: page-view-time-series-visualizer
---
# --description--
For this project you will visualize time series data using a line chart, bar chart, and box plots. You will use Pandas, matplotlib, and seaborn to visualize a dataset containing the number of page views each day on the freeCodeCamp.org forum from 2016-05-09 to 2019-12-03. The data visualizations will help you understand the patterns in visits and identify yearly and monthly growth.
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-page-view-time-series-visualizer).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the data analysis with Python curriculum. For now, you will have to use other resources to learn how to pass this challenge.
# --hints--
It should pass all Python tests.
```js
```
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```

View File

@ -0,0 +1,32 @@
---
id: 5e4f5c4b570f7e3a4949899f
title: Sea Level Predictor
challengeType: 10
dashedName: sea-level-predictor
---
# --description--
In this project, you will analyze a dataset of the global average sea level change since 1880. You will use the data to predict the sea level change through year 2050.
You can access [the full project description and starter code on Repl.it](https://repl.it/github/freeCodeCamp/boilerplate-sea-level-predictor).
After going to that link, fork the project. Once you complete the project based on the instructions in 'README.md', submit your project link below.
We are still developing the interactive instructional part of the data analysis with Python curriculum. For now, you will have to use other resources to learn how to pass this challenge.
# --hints--
It should pass all Python tests.
```js
```
# --solutions--
```py
# Python challenges don't need solutions,
# because they would need to be tested against a full working project.
# Please check our contributing guidelines to learn more.
```

View File

@ -0,0 +1,50 @@
---
id: 5e9a0a8e09c5df3cc3600ed4
title: 'Accessing and Changing Elements, Rows, Columns'
challengeType: 11
videoId: v-7Y7koJ_N0
dashedName: accessing-and-changing-elements-rows-columns
---
# --question--
## --text--
What code would change the values in the 3rd column of both of the following Numpy arrays to 20?
```py
a = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
# Output:
# [[ 1 2 20 4 5]
# [ 6 7 20 9 10]]
```
## --answers--
```python
a[:, 3] = 20
```
---
```python
a[2, :] = 20
```
---
```python
a[:, 2] = 20
```
---
```python
a[1, 2] = 20
```
## --video-solution--
3

View File

@ -0,0 +1,45 @@
---
id: 5e9a0a8e09c5df3cc3600ed3
title: Basics of Numpy
challengeType: 11
videoId: f9QrZrKQMLI
dashedName: basics-of-numpy
---
# --question--
## --text--
What will the following code print?
```python
b = np.array([[1.0,2.0,3.0],[3.0,4.0,5.0]])
print(b)
```
## --answers--
```python
[[1.0 2.0 3.0]
[3.0 4.0 5.0]]
```
---
```python
[[1. 2. 3.]
[3. 4. 5.]]
```
---
```python
[[1. 3.]
[2. 4.]
[3. 5.]
```
## --video-solution--
2

View File

@ -0,0 +1,44 @@
---
id: 5e9a0a8e09c5df3cc3600ed7
title: Copying Arrays Warning
challengeType: 11
videoId: iIoQ0_L0GvA
dashedName: copying-arrays-warning
---
# --question--
## --text--
What is the value of `a` after running the following code?
```py
import numpy as np
a = np.array([1, 2, 3, 4, 5])
b = a
b[2] = 20
```
## --answers--
```python
[1 2 3 4 5]
```
---
```python
[1 2 20 4 5]
```
---
```python
[1 20 3 4 5]
```
## --video-solution--
2

View File

@ -0,0 +1,61 @@
---
id: 5e9a0a8e09c5df3cc3600ed6
title: Initialize Array Problem
challengeType: 11
videoId: 0jGfH8BPfOk
dashedName: initialize-array-problem
---
# --question--
## --text--
What is another way to produce the following array?
```py
[[0. 0. 0. 0. 0. 0. 0.]
[0. 1. 1. 1. 1. 1. 0.]
[0. 1. 1. 1. 1. 1. 0.]
[0. 1. 1. 5. 1. 1. 0.]
[0. 1. 1. 1. 1. 1. 0.]
[0. 1. 1. 1. 1. 1. 0.]
[0. 0. 0. 0. 0. 0. 0.]]
```
## --answers--
```py
output = np.ones((7, 7))
z = np.zeros((5, 5))
z[2, 2] = 5
output[1:1, -1:-1] = z
```
---
```py
output = np.zeros((7,7))
z = np.ones((5, 5))
z[2, 2] = 5
output[1:-1, 1:-1] = z
```
---
```py
output = np.ones((7, 7))
z = np.zeros((5, 5))
z[3, 3] = 5
output[1:-1, 1:-1] = z
```
## --video-solution--
2

View File

@ -0,0 +1,44 @@
---
id: 5e9a0a8e09c5df3cc3600ed5
title: Initializing Different Arrays
challengeType: 11
videoId: CEykdsKT4U4
dashedName: initializing-different-arrays
---
# --question--
## --text--
What will the following code print?
```py
a = np.array([[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]])
print(np.full_like(a, 100))
```
## --answers--
```py
[[100 100 100 100 100]]
```
---
```py
[[100 100 100 100 100]
[100 100 100 100 100]]
```
---
```py
[[ 1 2 3 4 5]
[ 6 7 20 9 10]]
```
## --video-solution--
2

View File

@ -0,0 +1,56 @@
---
id: 5e9a0a8e09c5df3cc3600eda
title: Loading Data and Advanced Indexing
challengeType: 11
videoId: tUdBZ7pF8Jg
dashedName: loading-data-and-advanced-indexing
---
# --question--
## --text--
Given a file named `data.txt` with these contents:
<pre>
29,97,32,100,45
15,88,5,75,22
</pre>
What code would produce the following array?
```py
[29. 32. 45. 15. 5. 22.]
```
## --answers--
```py
filedata = np.genfromtxt('data.txt', delimiter=',')
output = np.any(filedata < 50)
print(output)
```
---
```py
filedata = np.genfromtxt('data.txt', delimiter=',')
output = np.all(filedata < 50, axis=1)
print(output)
```
---
```py
filedata = np.genfromtxt('data.txt', delimiter=',')
output = filedata[filedata < 50]
print(output)
```
## --video-solution--
3

View File

@ -0,0 +1,49 @@
---
id: 5e9a0a8e09c5df3cc3600ed8
title: Mathematics
challengeType: 11
videoId: 7txegvyhtVk
dashedName: mathematics
---
# --question--
## --text--
What is the value of `b` after running the following code?
```py
import numpy as np
a = np.array(([1, 2, 3, 4, 5], [6, 7, 8, 9, 10]))
b = np.max(a, axis=1).sum()
```
## --answers--
```py
10
```
---
```py
7
```
---
```py
5
```
---
```py
15
```
## --video-solution--
4

View File

@ -0,0 +1,49 @@
---
id: 5e9a0a8e09c5df3cc3600ed9
title: Reorganizing Arrays
challengeType: 11
videoId: VNWAQbEM-C8
dashedName: reorganizing-arrays
---
# --question--
## --text--
What code would produce the following array?
```py
[[1. 1.]
[1. 1.]
[1. 1.]
[1. 1.]]
```
## --answers--
```py
a = np.ones((2, 4))
b = a.reshape((4, 2))
print(b)
```
---
```py
a = np.ones((2, 4))
b = a.reshape((2, 4))
print(b)
```
---
```py
a = np.ones((2, 4))
b = a.reshape((8, 1))
print(b)
```
## --video-solution--
1

View File

@ -0,0 +1,34 @@
---
id: 5e9a0a8e09c5df3cc3600ed2
title: What is NumPy
challengeType: 11
videoId: 5Nwfs5Ej85Q
dashedName: what-is-numpy
---
# --question--
## --text--
Why are Numpy arrays faster than regular Python lists?
## --answers--
Numpy does not perform type checking while iterating through objects.
---
Numpy uses fixed types.
---
Numpy uses contiguous memory.
---
All of the above.
## --video-solution--
4