SQL Clauses Operators Functions Reference

SQL Clauses

ClausesHow to Use ItFunctionality
CREATE TABLECREATE TABLE table_name ...Creates a new table
INSERTINSERT INTO table_name ...Inserts new data into the table
SELECTSELECT col1, col2 ...Retrieves specified columns
SELECTSELECT * FROM ...Retrieves all columns from a table
FROMFROM table_nameSpecifies the table(s) from which to retrieve data
WHEREWHERE col > 5Filters rows based on specified conditions
UPDATE, SETUPDATE table_name SET column1 = value1;Updates column values for all rows (or specific
Read More

Python Core Concepts: File I/O, Data Structures & Algorithms

Python File Handling Basics

Common modes for opening files:

  • open(filename, 'w'): Open for writing (truncates file if exists, creates if not).
  • open(filename, 'r'): Open for reading (default mode).
  • open(filename, 'a'): Open for appending (creates file if not exists).

Common file handle (fh) methods:

  • fh.read(): Reads the entire file content.
  • fh.readline(): Reads a single line from the file.
  • fh.readlines(): Reads all lines into a list of strings.
  • fh.write(string): Writes a string to the file.
  • fh.writelines(list_
Read More

Using the Exam Cheat Sheet Editor

Using the Cheat Sheet Editor

Follow these steps to create your exam cheat sheet:

  1. Start writing your exam cheat sheet in the editor below.
  2. Pick the font size and the line height. Letter 5 is recommended for exams.
  3. Resize the exam cheat sheet by grabbing and moving the bottom right holder of the cheat sheet preview on the right side.
  4. Add more cheat sheets by pressing the (+) button.
Read More

Pandas in Python: Essential Techniques

Pandas – Part 2

Built-in Functions

  • Average of column: df_grades.Column.mean()
    • Average of multiple columns: df_grades[["column1", "column2"]].mean()
  • Max/min: df_grades["column name"].max() or .min()
  • Statistical summary: df_grades.describe()
    • Can get all key stats for numeric columns at once with the describe() method
      • Count, mean, std, min, 25%, 50%, 75%, max
    • Pick out chunks of the summary by storing the summary in a variable and then use variable[["column name", "column name"]]
  • Number of each unique value:
Read More