Skip to content

Commit cf2d2a1

Browse files
committed
update
1 parent 8bc7b34 commit cf2d2a1

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

content/getting-started/01_environment.qmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,8 +2226,7 @@ HTML(f"{style}\n{content_html}")
22262226

22272227
Cela est possible grâce à la vectorisation native des opérations de `Numpy` et à la magie `Pandas` qui réarrange tout ceci. Ce n'est pas utilisable avec n'importe quelle fonction. Pour d'autres fonctions, il faudra utiliser `assign`, généralement par le biais de _lambda functions_, des fonctions temporaires faisant office de passe plat. Par exemple, pour créer une variable selon cette approche, il faudrait faire:
22282228

2229-
```{python}
2230-
#| echo: true
2229+
```python
22312230
df.assign(
22322231
Energie_log = lambda x: np.log(x['Energie'])
22332232
)

content/manipulation/02_pandas_intro.qmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,7 @@ The equivalent SQL query would be quite tedious to write. For such operations, t
10751075

10761076
This is possible thanks to the native vectorization of `Numpy` operations and the magic of `Pandas` that rearranges everything. This is not usable with just any function. For other functions, you will need to use `assign`, generally through lambda functions, temporary functions acting as pass-throughs. For example, to create a variable using this approach, you would do:
10771077

1078-
```{python}
1079-
#| echo: true
1078+
```python
10801079
df.assign(
10811080
Energie_log = lambda x: np.log(x['Energie'])
10821081
)

0 commit comments

Comments
 (0)