What do you want to save?
Add Code snippet
New code examples
-
Python 2021-10-26 02:26:04
interesting python projects
# I understand that this isn't Grepper's primary use but here are some # fun little projects that I've found (self taught) to be really fun and # educational! def beginner(): # Beginner Projects beginner_proj =""" Everyone has to... Add solution -
Python 2021-10-21 11:51:06
python: np.arange decimal places
# It's embarrassing that python's range accumulate rounding errors # when using decimal step. # It's easy to implement a generator that does this even without accumulating # rounding errors. # # Lot of suggestions were made at https://stackoverflow.com/q... Add solution -
TypeScript 2021-10-20 15:49:05
difference between arrays and lists in python
lists and arrays are used in Python to store data(any data type- strings, integers etc), both can be indexed and iterated also. ... Arrays need to be declared whereas lists do not need declaration because they are a part of Python's syntax. This is the re... Add solution -
Python 2021-10-13 02:54:04
ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex); you can avoid this warning by specifying engine='python'.
import pandas as pd import io temp=u"""a;b;c 1;1,8 1;2,1 1;3,6 1;4,3 1;5,7 """ #after testing replace io.StringIO(temp) to filename df = pd.read_csv(io.StringIO(temp), sep="[;,]", engine='python') print (df) a ... Add solution -
Other 2021-10-06 06:36:04
yaml understanding
--- # document start # Comments in YAML look like this. ################ # SCALAR TYPES # ################ # Our root object (which continues for the entire document) will be a map, # which is equivalent to a dictionary, hash or object in other langua... Add solution -
Python 2021-10-06 00:32:03
python write to excel file
from openpyxl import Workbook row = 1 wb = Workbook() wb['Sheet'].title = "Report of Automation" sh1 = wb.active sh1['A1'].value = 'Name' sh1['B1'].value = 'Status' sh1['A2'].value = 'Python' sh1['B2'].value = 'Avtive' sh1['C1'].value = row sh1... Add solution -
Python 2021-10-05 15:57:05
with statement in python
In python if you want to operate some file then you have to use some specific function for that after using that we can read or manipulates the data of the file. And for operating the file we use open() function. open returns the file object, from which w... Add solution