/avatar.jpg

DATA100-L5: Data Wrangling and EDA

EDA: Exploratory Data Analysis Infinite loop DW & EDA…… DW: raw data -> clean data -> usable data key data properties to consider in EDA structure file format rectangular data: tables and matrices CSV, TabSV/TSV, json(is a dict) txt, XML 1 pd.read_csv('filename.tsv',delimiter='\t') turn to lec jupyter notebook to see more details 变量种类 注意:不唯一,不全面 multiple files 主键? granularity(颗粒度?) scope and temporality 颗粒度 scope: sampling frame temporality: time-series data unix time posix time

61B-14: Exceptions, Iterators, Iterables

Exceptions throw statement: throws an exception 1 2 3 4 5 6 public V get(K key) { int location = findKey(key); if (location < 0) { throw new IllegalArgumentException("Key " + key + " does not exist in map."); } return values[findKey(key)]; } 显式抛出异常 1 2 3 4 public static void main(String[] args) { System.out.println("ayyy lmao"); throw new RuntimeException("For no reason."); } What has been Thrown, can be Caught 1 2 3 4 5 6 7 8 9 10 11 Dog d = new Dog("Lucy", "Retriever", 80); d.

61B-15: Packages, Access Control, Objects

Packages and JAR Files 创建包 At the top of every file in the package, put the package name. Make sure that the file is stored in a folder with the appropriate folder name. For a package with name ug.joshh.animal, use folder ug/joshh/animal. 要用的时候import即可 default package JAR Files Access Control Object Methods: Equals and toString( ) toString( ) == vs equals( ) == compares references equals( ) compares values, but pay attention to the type!