Spaces:
Sleeping
Sleeping
eaglelandsonce
commited on
Commit
•
e93f572
1
Parent(s):
6c42acb
Update pages/2_PandasIntro.py
Browse files- pages/2_PandasIntro.py +1 -2
pages/2_PandasIntro.py
CHANGED
@@ -110,8 +110,7 @@ def example17():
|
|
110 |
|
111 |
def example18():
|
112 |
explanation = "Applying a function to a DataFrame."
|
113 |
-
code = "df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})\ndf.apply(lambda x:
|
114 |
-
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})\ndf.apply(lambda x: x + 1)"
|
115 |
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
|
116 |
return explanation, code, df.apply(lambda x: x + 1)
|
117 |
|
|
|
110 |
|
111 |
def example18():
|
112 |
explanation = "Applying a function to a DataFrame."
|
113 |
+
code = """df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})\ndf.apply(lambda x: x + 1)"""
|
|
|
114 |
df = pd.DataFrame({'A': [1, 2, 3], 'B': [4, 5, 6]})
|
115 |
return explanation, code, df.apply(lambda x: x + 1)
|
116 |
|