Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit91bbd3d

Browse files
authored
Merge branch 'main' into bug/1526
2 parents41f81d5 +695dd06 commit91bbd3d

File tree

55 files changed

+310
-272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+310
-272
lines changed

‎.learn/exercises/02.2-import/README.es.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,26 @@
22

33
Ahora, vamos a añadir Pandas en nuestro script utilizando el comando`import`.
44

5-
El comando`import` está destinadoa cargar librerías deterceras partes (como Pandas) u otros archivos de Python que hayas creado (que haremos en el futuro).
5+
El comando`import` está destinadopara cargar librerías deterceros (como Pandas) u otros archivos de Python que hayas creado (que haremos en el futuro).
66

77
##📝 Instrucciones:
88

99
1. Escribe`import pandas as pd` dentro del archivo`app.py` para importar la librería de Pandas.
1010

11-
2.Utiliza la función de Pandas`read_csv` para importar el contenido del archivo CSV en una variable llamada`data_frame`.
11+
2.Crea una variable llamada`data_frame`.
1212

13-
3.Imprime lavariable enelterminal usandolafunción`print`.
13+
3.Utiliza lafunción de Pandas`read_csv` para importarelcontenido del archivo CSV en esta ruta`.learn/assets/pokemon_data.csv` y asígnalo alavariable`data_frame`
1414

15-
##Resultado Esperado:
15+
4. Imprime la variable en el terminal usando la función`print`.
16+
17+
##💻 Resultado Esperado:
1618

1719
Corre tu script y deberías ver la siguiente salida:
1820

19-
![print file](../../assets/print-file.png)
21+
![correr archivo app.py](../../assets/print-file.png)
2022

2123
##💡 Pista:
2224

23-
+ Tu código debería ser algo así
24-
25-
```python
26-
import pandasas pd
27-
28-
data_frame= pd.read_csv('.learn/assets/pokemon_data.csv')
29-
print(data_frame)
30-
```
25+
+ Echa un vistazo a la documentación de`read_csv`:https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
3126

3227
>Nota: La función`read_csv` devuelve algo llamado`DataFrame`; nos estaremos refiriendo a eso como una variable de ahora en adelante.

‎.learn/exercises/02.2-import/README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,26 @@
22

33
Now let's add Pandas into our script by using the`import` command.
44

5-
The`import` command is meant for loading 3rd part libraries (like Pandas) or other Python files that you have created (which we will do in the future).
5+
The`import` command is meant for loading 3rd-party libraries (like Pandas) or other Python files that you have created (which we will do in the future).
66

77
##📝 Instructions:
88

99
1. Type`import pandas as pd` inside the file`app.py` to import the Pandas library.
1010

11-
2.Use the Pandas`read_csv` function to import the content of the CSV file into a variable called`data_frame`.
11+
2.Create a variable called`data_frame`.
1212

13-
3.Print thevariable on the terminal using the`print` function.
13+
3.Use thePandas`read_csv` function to import thecontents of a CSV file in this path`.learn/assets/pokemon_data.csv`; assign it to the variable`data_frame`.
1414

15-
##Expected Result:
15+
4. Print the variable on the terminal using the`print` function.
1616

17-
Run your script and you should see the following output:
17+
##💻 Expected Result:
1818

19-
![print file](../../assets/print-file.png)
19+
Run your script, and you should see the following output:
2020

21-
##💡 Hint:
22-
23-
+ Your code should be something like this
21+
![Run app.py file](../../assets/print-file.png)
2422

25-
```python
26-
import pandasas pd
23+
##💡 Hint:
2724

28-
data_frame= pd.read_csv('.learn/assets/pokemon_data.csv')
29-
print(data_frame)
30-
```
25+
+ Check the`read_csv` documentation:https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
3126

32-
>Note: The`read_csv` function returns something called a`DataFrame`; we will berefering to it as a variable from now on.
27+
>Note: The`read_csv` function returns something called a`DataFrame`; we will bereferring to it as a variable from now on.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
importpandasaspd
2+
3+
data_frame=pd.read_csv('.learn/assets/pokemon_data.csv')
4+
print(data_frame)

‎.learn/exercises/03-datasets/README.es.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22

33
En Machine Learning los "Datasets" son los datos que utilizamos para nuestros experimentos. Por lo general, alimentamos estos Datasets a "modelos" y experimentamos de diferentes maneras, el objetivo siempre es predecir algo.
44

5-
Posibles Datasets basados en tu predicción objetiva:
5+
Posibles Datasets basados enel objetivo detu predicción:
66

7-
- Si vendemos zapatos, ¿Cuántos zapatos necesito en mi almacén para el próximo mes? Un buen Datasetserán las ventas de los últimos 2 años.
7+
- Si vendemos zapatos, ¿Cuántos zapatos necesito en mi almacén para el próximo mes? Un buen Datasetserían las ventas de los últimos 2 años.
88

9-
- Si estamos construyendo un programa para diagnosticar neumonía, un buen Datasetserán 100 radiografías con neumonía y 100 radiografías sin neumonía.
9+
- Si estamos construyendo un programa para diagnosticar neumonía, un buen Datasetserían 100 radiografías con neumonía y 100 radiografías sin neumonía.
1010

1111
Tienes que ser creativo al crear tus Datasets, piensa en todas las variables que afectan la predicción y trata de recolectar y organizar todo en uno o varios Datasets.
1212

13-
Este proyecto ya viene con un Dataset de Pokémon, ubicado en la ruta:`./.learn/assets/pokemon_data.csv`.
13+
Este proyecto ya viene con un Dataset de Pokémon, ubicado en la ruta:`.learn/assets/pokemon_data.csv`.
1414

1515
##📝 Instrucciones:
1616

1717
1. Puedes abrir el archivo manualmente o corriendo el siguiente comando en tu terminal:
1818

1919
```bash
20-
$ code ./.learn/assets/pokemon_data.csv
20+
$ code .learn/assets/pokemon_data.csv
2121
```
2222

2323
##💡 Pista:
2424

2525
Después de abrir el archivo, verás algo como esto:
2626

27-
![Pokemon CSVPreview](../../assets/csv-preview.png)
27+
![Pokemon CSVprevisualización](../../assets/csv-preview.png)
2828

29-
Como puedes ver, los datos están representados en un archivo CSV donde cada fila es unpokemón diferente con su propio ID, Nombre, Tipo, HP, Ataque, etc.
29+
Como puedes ver, los datos están representados en un archivo CSV donde cada fila es unPokemon diferente con su propio ID, Nombre, Tipo, HP, Ataque, etc.
3030

31-
Por favorhas clic en`next ->` y ve al siguiente paso del ejercicio.
31+
>Por favorhaz clic en`Next ->` y ve al siguiente paso del ejercicio.
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
#`03` Datasets
22

3-
In Machine Learning "Datasets" are the data we use for our experiments. We usually feed these Datasets to "models" and experiment in different ways, the goal is always to predict something.
3+
In Machine Learning, "Datasets" are the data we use for our experiments. We usually feed these Datasets to "models" and experiment in different ways; the goal is always to predict something.
44

55
Possible datasets based on your objective prediction:
66

7-
- If we sell shoes, howmuch shoes do I need in mywharehouse for the next month? A good Datasetwill be sales from the past 2 years.
7+
- If we sell shoes, howmany shoes do I need in mywarehouse for the next month? A good Datasetwould be the sales from the past 2 years.
88

9-
- If we are building a program todiagnost pneumonia, a good Datasetwill be 100 x-rays with pneumonia and 100 x-rays without pneumonia.
9+
- If we are building a program todiagnose pneumonia, a good Datasetwould be 100 x-rays with pneumonia and 100 x-rays without pneumonia.
1010

11-
You have to be creative when creating your datasets, think about all the variables that affect a prediction and try collecting and organizingeverthing in one or many Datasets.
11+
You have to be creative when creating your datasets. Think about all the variables that affect a prediction, and try collecting and organizingeverything in one or many Datasets.
1212

13-
This project already comes with a Pokemon dataset located in the path:`./.learn/assets/pokemon_data.csv`.
13+
This project already comes with a Pokemon dataset located in the path:`.learn/assets/pokemon_data.csv`.
1414

1515
##📝 Instructions:
1616

17-
1. You can open the file manually or by running the followingcommnad on your terminal:
17+
1. You can open the file manually or by running the followingcommand on your terminal:
1818

1919
```bash
20-
$ code ./.learn/assets/pokemon_data.csv
20+
$ code .learn/assets/pokemon_data.csv
2121
```
2222

2323
##💡 Hint:
@@ -26,6 +26,6 @@ $ code ./.learn/assets/pokemon_data.csv
2626

2727
![Pokemon CSV Preview](../../assets/csv-preview.png)
2828

29-
As you can see, the data is represented in a CSV file where every row is a differentpokemon with its own ID, Name, Type, HP, Attack, etc.
29+
As you can see, the data is represented in a CSV file where every row is a differentPokemon with its own ID, Name, Type, HP, Attack, etc.
3030

31-
Please click`next ->` and move to the next step of the exercise.
31+
>Please click`Next ->` and move to the next step of the exercise.

‎.learn/exercises/04-Series/README.es.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data = pd.Series([1, 94, 85, 31, 23, 8])
1010

1111
El resultado de imprimir`data` en el terminal debe ser algo así:
1212

13-
```shell
13+
```bash
1414
0 1
1515
1 94
1616
2 85
@@ -22,9 +22,13 @@ dtype: int64
2222

2323
##📝 Instrucciones:
2424

25-
1. Crea una serie de esta lista:`ages = [23,45,7,34,6,63,36,78,54,34]`
25+
1. Copia esta lista de Python que contiene edades a tu código:`[23,45,7,34,6,63,36,78,54,34]`
26+
27+
2. Crea una Serie a partir de esa lista.
2628

27-
##Resultado Esperado:
29+
3. Imprime tu nueva Serie en la consola.
30+
31+
##💻 Resultado Esperado:
2832

2933
```bash
3034
0 23
@@ -38,4 +42,4 @@ dtype: int64
3842
8 54
3943
9 34
4044
dtype: int64
41-
```
45+
```

‎.learn/exercises/04-Series/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#`04` Series
22

3-
A series is similar to an array or list, it's a one dimentional data structure.
3+
A series is similar to an array or list; it's a one-dimensional data structure.
44

55
You can create a series like this:
66

@@ -10,7 +10,7 @@ data = pd.Series([1, 94, 85, 31, 23, 8])
1010

1111
The result of printing`data` on the terminal will be something like this:
1212

13-
```shell
13+
```bash
1414
0 1
1515
1 94
1616
2 85
@@ -22,9 +22,13 @@ dtype: int64
2222

2323
##📝 Instructions:
2424

25-
Create a series from this list:`ages = [23,45,7,34,6,63,36,78,54,34]`
25+
1. Copy this Python list of ages to your code:`[23,45,7,34,6,63,36,78,54,34]`
26+
27+
2. Create a Series from the given list.
2628

27-
##Expected Result:
29+
3. Print your new Series on the console.
30+
31+
##💻 Expected Result:
2832

2933
```bash
3034
0 23
@@ -38,4 +42,4 @@ Create a series from this list: `ages = [23,45,7,34,6,63,36,78,54,34]`
3842
8 54
3943
9 34
4044
dtype: int64
41-
```
45+
```
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
importpandasaspd
2-
# two dimensional array of name,age values.
3-
data=pd.Series([23,45,7,34,6,63,36,78,54,34])
42

5-
print(data)
3+
ages=pd.Series([23,45,7,34,6,63,36,78,54,34])
4+
5+
print(ages)

‎.learn/exercises/04-Series/test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,3 @@ def test_expected_output(capsys):
3232
9 34
3333
dtype: int64
3434
"""incaptured.out
35-
36-
@pytest.mark.it('The variable ages must exist')
37-
deftest_vatiable_existence():
38-
fromappimportages

‎.learn/exercises/04.1-date-range/README.es.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
##📝 Instrucciones:
44

5-
1. Usa la función`pd.date_range` para crear una serie del`05-01-2021` al`05-12-2021` y imprime el resultado en la terminal.
5+
1. Usa la función`pd.date_range` para crear una serie del`2021-05-01` al`2021-05-12` e imprime el resultado en la terminal.
66

7-
##Resultado Esperado:
7+
##💻Resultado Esperado:
88

99
```bash
1010
DatetimeIndex(['2021-05-01','2021-05-02','2021-05-03','2021-05-04',
1111
'2021-05-05','2021-05-06','2021-05-07','2021-05-08',
1212
'2021-05-09','2021-05-10','2021-05-11','2021-05-12'],
1313
dtype='datetime64[ns]', freq='D')
14-
```
14+
```
15+
16+
##💡 Pista:
17+
18+
+ En las fechas puedes usar los formatos`DD-MM-AAAA` o`AAAA-MM-DD`.

‎.learn/exercises/04.1-date-range/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
##📝 Instructions:
44

5-
1. Use the`pd.date_range` function to create a series from`05-01-2021` to`05-12-2021` and print it to the terminal.
5+
1. Use the`pd.date_range` function to create a series from`2021-05-01` to`2021-05-12` and print it to the terminal.
66

7-
##Expected Result:
7+
##💻Expected Result:
88

99
```bash
1010
DatetimeIndex(['2021-05-01','2021-05-02','2021-05-03','2021-05-04',
1111
'2021-05-05','2021-05-06','2021-05-07','2021-05-08',
1212
'2021-05-09','2021-05-10','2021-05-11','2021-05-12'],
1313
dtype='datetime64[ns]', freq='D')
14-
```
14+
```
15+
16+
##💡 Hint:
17+
18+
+ In the date format you can use`DD-MM-YYYY` or`YYYY-MM-DD`.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
importpandasaspd
22

3-
date_series=pd.date_range(start='05-01-2021',end='05-12-2021')
3+
date_series=pd.date_range(start='2021-05-01',end='2021-05-12')
44

5-
print(date_series)
5+
print(date_series)

‎.learn/exercises/04.2-series-apply/README.es.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#`04.2` Series Apply
22

3-
Dada unaserievariablecomo:
3+
Dada una variableque contiene una serie:
44

55
```py
66
my_series= pd.Series([2,4,6,8,10])
@@ -10,7 +10,7 @@ my_series = pd.Series([2, 4, 6, 8, 10])
1010

1111
1. Usa la función`my_series.apply` para dividir todos los números de la siguiente serie por 2 e imprime el resultado a la terminal.
1212

13-
##Resultado Esperado:
13+
##💻Resultado Esperado:
1414

1515
```bash
1616
0 1.0

‎.learn/exercises/04.2-series-apply/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ my_series = pd.Series([2, 4, 6, 8, 10])
88

99
##📝 Instructions:
1010

11-
1. Use the function`my_series.apply` to divide all numberson the following series by 2 and print the result to the terminal.
11+
1. Use the function`my_series.apply` to divide all numbersin the following series by 2 and print the result to the terminal.
1212

13-
##Expected Result:
13+
##💻Expected Result:
1414

1515
```bash
1616
0 1.0

‎.learn/exercises/04.2-series-apply/solution.hide.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
my_series=pd.Series([2,4,6,8,10])
44
modified_series=my_series.apply(lambdax:x/2)
5-
print(modified_series)
5+
6+
print(modified_series)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp