What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-08 03:01:07
Split column values
# make string version of original column, call it 'col' df['col'] = df['col1'].astype(str) # make the new columns using string indexing df['col1'] = df['col'].str[0:2] df['col2'] = df['col'].str[2:4] df['col3'] = df['col'].str[4:6] # get rid of the extr... Add solution -
Python 2021-08-30 19:18:02
word search puzzle python
An improved (shorter, more efficient) version of the above: #!/usr/bin/python # -*- coding: utf-8 -*- puzzle='''F Y Y H N R D R L J C I N U A A W A A H R N T K L P N E C I L F S A P E O G O T P N H P O L A N D ''' clues = ['ITALY', 'HOLLAND'... Add solution