Skip to content

Commit 5723194

Browse files
committed
Added chapter_02_video_02 code.
1 parent 213db2c commit 5723194

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

code/chapter_02_video_02.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pandas as pd
2+
3+
painful_strings = {'painful_strings':
4+
['usePython', 'pandasForLife', 'Python is helpful']}
5+
6+
long_strings = pd.DataFrame(data=painful_strings)
7+
8+
long_strings['painful_strings'].str.replace(
9+
pat='([a-z])([A-Z])',
10+
repl='\\1 \\2')

0 commit comments

Comments
 (0)