What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-18 18:11:04
pandas read chunk of csv
import pandas as pd import pickle in_path = "" #Path where the large file is out_path = "" #Path to save the pickle files to chunk_size = 400000 #size of chunks relies on your available memory separator = "~" reader = pd.r... Add solution -
Python 2021-09-18 18:06:03
get table wikipedia
import requests from bs4 import BeautifulSoup URL = "https://en.wikipedia.org/wiki/List_of_current_heads_of_state_and_government" res = requests.get(URL).text soup = BeautifulSoup(res,'lxml') for items in soup.find('table', class_='wikitable')... Add solution -
Python 2021-09-18 16:09:03
python email exception error
#This gives feedback on errors within a script which then emails output import win32com.client import os import sys try: #Some code except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() fname = os.path.split(exc_tb.tb_frame.f_co... Add solution -
Python 2021-09-18 11:47:04
pygame color picker
from hooman import Hooman import pygame window_width, window_height = 500, 500 hapi = Hooman(window_width, window_height) slider_options = {"value_range": [0, 255]} r_slider = hapi.slider(50, 300, 400, 10, slider_options) g_slider = hapi.sli... Add solution