What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-06 22:55:04
rstrip in python
#!/usr/bin/python str = " this is string example....wow!!! "; print str.rstrip() str = "88888888this is string example....wow!!!8888888"; print str.rstrip('8') #the answer #this is string example....wow!!! #88888888this is s... Add solution -
Python 2021-09-11 23:34:03
pandas string manipulation on column
In [21]: def func(string): a_new_string =string.replace('- ','_') a_new_string1 =a_new_string.replace('-','_') a_new_string2= a_new_string1.rstrip(' months') return a_new_string2 df['Time'] = df['Time'].apply(func) df Out[21]: Time 0... Add solution -
-
Python 2021-08-28 05:43:02
python form enter data
import os import sys from collections import OrderedDict from PyPDF2 import PdfFileReader def _getFields(obj, tree=None, retval=None, fileobj=None): fieldAttributes = {'/FT': 'Field Type', '/Parent': 'Parent', '/T': 'Field Name', '/TU': 'Alterna... Add solution