Wednesday, October 2, 2019

Python - onenote lbm


Libraries to note
openpyxl




Python tutorials to integrate the CSV files


looping through Lists

Data Manipulation Techniques

Looping thru the dataframe


Python Documentation


Kaggle Kernels

how to refere a file in Kaggle Kernel

Kernel Question

urllib


--Reading CSV using Pandas


Splitting String and dictionaries

How to separate List elements on a new line

How to Parse Excel fil in Python

Sample script to read a file in Kernel

Excel-Python

---CamlelCase to Snake_Case

import pandas as pd
import re
REG = r"(.+?)([A-Z])"
def snake(match):
    return match.group(1).lower() + "_" + match.group(2).lower()
df = pd.read_csv('../input/Accounts_Payable_csv.csv') # load data from csv
words = df['Column Physical_Name']
results = [re.sub(REG, snake, w, 0) for w in words]
print("\n".join(results))

URLLIB

Code Beautifier


Webscraping samples

  
import requests
from bs4 import BeautifulSoup
# This code gets the latest details of the yellowdig team members using WebScraping techniques
# get the data
data = requests.get('https://yellowdig.com/our-philosophy/team')
# load data into bs4
soup = BeautifulSoup(data.text, 'html.parser')
team = soup.findAll('div', { 'class': 'apos-rich-text'})
for x in team:
print (x.text)

From <https://github.com/kajals/Python/blob/master/WebScraping>



Nested find in BS4



Beautiful Soup Documentation




Engineer Man Tutorial to revert back for Craigslist Scam



Datascience Dojo



First Web Scraping Sample

Python Bot



No comments:

Post a Comment