This page includes tutorials of Python basics and Python built-in data types.
Python Basics
- What is Python and how to get started
- What are class, object, and method
- Date and time
- The Difference between Naive versus Aware Datetime Objects
- How to Get Current Date and Weekday in Python
- For loop
- How to use and write If Else in Python
- How to check the current Python version
- How to get the current date in Python
- Examples of random.seed( ) in Python
Python Built-in Data Types
- Overview of Python built-in data types
- Strings
- Booleans
- Sets
- Frozenset
- Lists
- Tuples
- Dictionaries
- Binary
Python Basics: How To Tutorials
- How to clear or empty a list in Python (Examples)
- How to Convert List to String in Python (2 Examples)
- Check if an item in a Python list
Numpy
- Generate Random Numbers in Python
- How to generate a sample of normal distribution
- How to calculate mean in Python
- How to calculate standard deviation in Python
- How to convert numpy array to list
- How to create an empty matrix in NumPy
- How to convert array to column in Pandas dataframe
- How to Use numpy.random.seed()
- Numpy Checks it is a Scalar or an Array (Examples)
- Examples of Generating 2-D Numpy Array
- 3 Examples for Numpy np.dot()
- How to Combine Multiple Numpy Arrays into a Dataframe
- How to Convert 2-D Arrays to 1-D Arrays
- When to Use ddof=1 in np.std()
- Combine Lists into an Array in Python
Pandas: Read and Save Files
- How to read CSV or Excel files in Pandas
- How to read Excel files with multiple sheets with Pandas
- Pandas: Read all sheets in Excel
- How to read text (txt) files in Pandas
- Pandas: Read CSV from Github
- How to download CSV files from GitHub
- Upload CSV to Github
- How to save dataframes as CSV and xlsx files in Python
- Pandas dataframe to csv
- Difference between `sep` and `delimiter` attributes in read_csv() and read_table()
- How to Avoid Including Dataframe Index when Saving as CSV file in Python
- Convert CSV to Excel in Python
- Print Current Working Directory in Jupyter Notebook
- Read CSV without the first column in Python
Pandas: Concat, Join, and Merge Dataframes
- Pandas: Concat two dataframes
- Pandas: Join two dataframes
- Pandas: merge dataframes
- Pandas: append two dataframes
- Join two dataframes in Pandas based on a column
- Merge two dataframes in Pandas based on a column
- Pandas left join two dataframes
- Left merge in Pandas Python
- Outer join in Pandas
- Outer merge in Pandas
Dataframe Manipulation
Tutorial dealing with NaN:
- How to drop rows or columns with missing data (NaN) in Pandas
- How to Replace NaN with Zero in Pandas
- How to Replace NaN with Blank/Empty Cells in Pandas
- Check if Any Value is NaN in a DataFrame
- Count the Number of NaN in Pandas Dataframes
Add and remove:
- How to combine a Pandas dataframe and a Numpy matrix
- How to add Numpy arrays to a Pandas dataframe
- How to Create an Empty Pandas Dataframe
- How to Create Dummy Variable in Python
Select:
- How to select columns to form a new dataframe in Python Pandas
- Pandas: Select two columns from a dataframe (examples)
- Select Rows based on values in multiple columns in Pandas Dataframes
- How to select or subset dataframe columns in Python
- How to select rows based on column values in Python
Modify:
- How to reverse row order in Pandas dataframes
- How to Round Numbers in Pandas
- How to modify dataframe columns and rows in Python
- How to reorder columns in a dataFrame in Python
- How to change string to date and time in Pandas
- How to rename just one column in Pandas
- How to convert the index as a column in Pandas
- Convert a Pandas dataframe to a dictionary
- How to change column names of Pandas DataFrames
Pandas functions:
Pandas: Calculations with Dataframes
- How to use groupby() in Pandas dataframes
- How to create a contingency table in Pandas
- Calculate Means Group by Two Columns in Pandas (3 Examples)
- How to check data types in Pandas
- How to get frequency counts of a column in Pandas
- How to mean centering in Pandas
- How to sum rows in dataframe in Python
- How to use Lambda functions in Python (Pandas)
- How to check the number of rows in Pandas
Pandas: How to Fix
- How to Fix: if using all scalar values, you must pass an index
- How to Fix: Data must be 1-dimensional
- How to Fix: has no attribute ‘dataframe’