Skip to Main Content
Big Data Simplified
book

Big Data Simplified

by Sayan Goswami, Amit Kumar Das, Sourabh Mukherjee
June 2019
Beginner to intermediate content levelBeginner to intermediate
360 pages
10h 55m
English
Pearson Education India
Content preview from Big Data Simplified
198 | Big Data Simplied
The subset of a data frame can be drawn in two ways and it is briey explained as follows.
Option 1: By specifying column numbers or names in parenthesis.
   > dfStud[ ,1:3]
   StudIdStudNameStudMarks
1 6 Sejal 76
2 7 Param 56
3 8 Hetal 93
4 9 Minu 78
5 10 Virat 82
   > dfStud[ ,c(StudId, StudHeight)]
   StudIdStudHeight
1 6 Tall
2 7 Short
3 8 Short
4 9 Medium
5 10 Tall
Option 2: By using subset() function.
   > subset(dfStud[c(StudId, StudHeight)])
   StudIdStudHeight
1 6 Tall
2 7 Short
3 8 Short
4 9 Medium
5 10 Tall
   > subset(dfStud, StudMarks> 80)
   StudIdStudNameStudMarksStudHeight
3 8 Hetal 93 Short
5 10 Virat 82 Tall
   > subset(dfStud[c(StudId, StudName)], StudMarks> 80)
   StudIdStudName ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Big Data

Big Data

James Warren, Nathan Marz
Practical Text Mining and Statistical Analysis for Non-structured Text Data Applications

Practical Text Mining and Statistical Analysis for Non-structured Text Data Applications

Gary D. Miner, John Elder, Andrew Fast, Thomas Hill, Robert Nisbet, Dursun Delen
Data Wrangling with Python

Data Wrangling with Python

Jacqueline Kazil, Katharine Jarmul

Publisher Resources

ISBN: 9789353941505