This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table post31 ( | |
id int, | |
name string, | |
gender string | |
) | |
partitioned by (year int, month int) | |
row format delimited | |
fields terminated by ',' | |
stored as textfile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | tina | F | 2000 | 1 | |
---|---|---|---|---|---|
2 | jerry | M | 1997 | 5 | |
3 | tom | M | 1996 | 5 | |
4 | wonder woman | F | 1586 | 10 | |
5 | scoobydoo | M | 1991 | 3 | |
6 | donald duck | M | 1995 | 6 | |
7 | pink panther | F | 1997 | 8 | |
8 | oggy | M | 2010 | 10 | |
9 | shinchan | M | 2005 | 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | tina | F | |
---|---|---|---|
2 | jerry | M | |
3 | tom | M | |
4 | wonder woman | F | |
5 | scoobydoo | M | |
6 | donald duck | M | |
7 | pink panther | F | |
8 | oggy | M | |
9 | shinchan | M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table post29( | |
id int, | |
name string, | |
gender string | |
) | |
row format delimited | |
fields terminated by ',' | |
stored as textfile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from categories; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Country | Age | Salary | Purchased | |
---|---|---|---|---|
France | 44 | 72000 | No | |
Spain | 27 | 48000 | Yes | |
Germany | 30 | 54000 | No | |
Spain | 38 | 61000 | No | |
Germany | 40 | Yes | ||
France | 35 | 58000 | Yes | |
Spain | 52000 | No | ||
France | 48 | 79000 | Yes | |
Germany | 50 | 83000 | No |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DATA PREPROCESSING | |
# setting the working directory | |
setwd("C:\\Users\\User\\Desktop\\blog\\3 ML Data Preprocessing\\R") | |
# IMPORTING THE DATASET | |
dataset = read.csv("Data.csv") | |
# viewing the imported dataset | |
View(dataset) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
This python file demonstrates the concepts | |
we are going to cover in Data Preprocessing | |
""" | |
# IMPORTING THE LIBRARIES | |
# numpy contains mathematical operations | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- this pig script demonstrates how to invoke an UDF in Apache PIG | |
-- LOAD command is used to load data from post27.csv into input_data pig relation | |
input_data = LOAD '/hdpcd/input/post27/post27.csv' USING PigStorage(','); | |
-- we need to register the jar file first with REGISTER command | |
REGISTER /usr/hdp/2.3.0.0-2557/pig/piggybank.jar; | |
-- defining an alias for the fully qualified class name UPPER | |
DEFINE upper org.apache.pig.piggybank.evaluation.string.UPPER; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | Richard | Hernandez | XXXXXXXXX | XXXXXXXXX | 6303 Heather Plaza | Brownsville | TX | 78521 | |
---|---|---|---|---|---|---|---|---|---|
526 | Kimberly | Barrett | XXXXXXXXX | XXXXXXXXX | 7988 High Jetty | Brownsville | TX | 78521 |