-
Using iloc, loc, & ix to select rows and columns in Pandas DataFrames
Converting categorical features to numerical values using LabelEncoder
Online editor for converting latex equations to html scripts for adding tos markdown
Leetcode questions and solutions:
-
Two Sum Problem
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.
class Solution(object):
def twoSum(self, nums:list[int], target:int) -> list[int]:
numsMap = {} n = len(nums) for i in range(n):
c = target - nums[i] if c in numsMap:
return [numsMap[c], i]
numsMap[nums[i]] = i
return []
Converting categorical features to numerical values using LabelEncoder
Online editor for converting latex equations to html scripts for adding to markdown
Public Datasets:
- Customer Churn Dataset (36 KB, 200 samples):
!wget -O ChurnData.csv https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/ML0101ENv3/labs/ChurnData.csv
- Cancer Dataset (21KB, 699 samples):
!wget -O cell_samples.csv https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/ML0101ENv3/labs/cell_samples.csv
- Customer Segmentation (34KB, 850 samples)
!wget -O Cust_Segmentation.csv https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/ML0101ENv3/labs/Cust_Segmentation.csv
- Loan Dataset (23Kb, 346 samples)
!wget -O loan_train.csv https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/ML0101ENv3/labs/loan_train.csv