Tag: Pandas

Merging dataframes with Pandas

Performing Anti-Joins Merge employees and top_cust with a left join, setting indicatorargument to True. Save the result to empl_cust. Select the srid column of empl_cust and the rows where _merge is 'left_only'. Save the result to srid_list. Subset the employees table and select those rows where the srid is in the variable srid_list and print the results. Success! You performed an anti-join by first merging the tables with a left...

Reading a .csv file with Python and creating a DataFrame

In this chapter I will dive into reading the data in .csv file and creating a DataFrame. A .csv file stands for comma-separated value, so it simply contains a set of values separated by a comma where each line is a new record in plain text. For this exercise...