"Every business collects data, and it's the job of the data scientist to analyze, interpret, and communicate that information in a way that will help drive company decisions. In an interview, expect to answer technical questions about your ability to perform quantitative tests as well as create clear visualizations of large, complex data sets. Come ready to discuss past projects you've worked on and how you communicate data findings clearly and concisely in order to help solve business-related problems."
A table has a column with full names(e.g. 'Tom Hardin'). write a python code to get distinct first names(i know its super easy in sql)
select distinct (substr(fullname, 0, instr(fullname,' ')-1)) from data
Assuming table has only one column and first & last name separated with space. f = open('file','r') set([i.split(" ") for i in f]) f.close
import pandas as pd df = pd.read_csv('name.csv') df['First Name'] = df['Full Name'].apply(lambda x: x.split(' ')) df['Surname'] = df['Full Name'].apply(lambda x: x.split(' '))