SlideShare a Scribd company logo
1 of 14
Download to read offline
MATHEMATICA
Wolfram Language
Datasets
Wolfram Cloud
Organise Your Work
Statistics Folder
Datasets
■ Without a plan, you will be unable to upload datasets.
■ We can make datasets in the notebooks
■ Consider the dataset: db1 = Dataset [{1, 2, 3, 4, 5}]
■ Shift-Enter to run the line of code and you will see the
output as shown above.
Datasets
■ Try the dataset: db2 = Dataset [{1, 2, 3, 4, 5}]
■ Add in three more elements to the dataset: db2 = Dataset [{1,
2, 3, 4, 5, 6, 7, 8}]
Solution
Dataset Doubles
■ Try this: db2 = [{1, 2}, {2, 4}, {3, 6}]
Dataset Doubles
■ Try this: db2 = [{1, 2}, {2, 4}, {3, 6}] and add n three more
elements as we did before.
More Doubles
Try this:
db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}]
What is the output?
More Doubles
Try this:
db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}]
What is the output?
More Doubles
Try this:
db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}]
Add in another column and another row…
More Doubles: Another column and another row…
db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}]
Datasets
Construct the following in a single notebook and save your notebook
as “datasets.nb” in Wolfram Cloud in the “Statistics” folder on your
account:
■ db1 = [{3, 6, 9, 12, 15}]
■ db2 = [{{1, 2}, {2, 4}, {3, 6}, {4, 8}, {5, 10}]
■ db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>,
<|"a" -> 3, "b" -> 8|>}]
■ db4 = Dataset[{ <|"a" -> 1, "b" -> 70|>, <|"a" -> 2, "b" -> 71|>,
<|"a" -> 3, "b" -> 74|>, <|"a" -> 4, "b" -> 80|>, <|"a" -> 5, "b" ->
73|>, <|"a" -> 6, "b" -> 75|>}]
■ db5 = Dataset[{ <|"a" -> 1, "b" -> "x", "c" -> {1}|>, <|"a" -> 2, "b" -
> "y", "c" -> {2, 3}|>, <|"a" -> 3, "b" -> "z", "c" -> {3}|>, <|"a" -> 4,
"b" -> "x", "c" -> {4, 5}|>, <|"a" -> 5, "b" -> "y", "c" -> {5, 6, 7}|>,
<|"a" -> 6, "b" -> "z", "c" -> {}|>}]

More Related Content

What's hot

What's hot (14)

Pandas data transformational data structure patterns and challenges final
Pandas   data transformational data structure patterns and challenges  finalPandas   data transformational data structure patterns and challenges  final
Pandas data transformational data structure patterns and challenges final
 
Refactoring et al
Refactoring et alRefactoring et al
Refactoring et al
 
Data Visualization using base graphics
Data Visualization using base graphicsData Visualization using base graphics
Data Visualization using base graphics
 
Set Operations - Union Find and Bloom Filters
Set Operations - Union Find and Bloom FiltersSet Operations - Union Find and Bloom Filters
Set Operations - Union Find and Bloom Filters
 
Transpose and manipulate character strings
Transpose and manipulate character strings Transpose and manipulate character strings
Transpose and manipulate character strings
 
mongoDB Project: Relational databases & Document-Oriented databases
mongoDB Project: Relational databases & Document-Oriented databasesmongoDB Project: Relational databases & Document-Oriented databases
mongoDB Project: Relational databases & Document-Oriented databases
 
Hyper loglog
Hyper loglogHyper loglog
Hyper loglog
 
India software developers conference 2013 Bangalore
India software developers conference 2013 BangaloreIndia software developers conference 2013 Bangalore
India software developers conference 2013 Bangalore
 
intern_showcase_FINAL
intern_showcase_FINALintern_showcase_FINAL
intern_showcase_FINAL
 
L6 structure
L6 structureL6 structure
L6 structure
 
Python data structures - best in class for data analysis
Python data structures -   best in class for data analysisPython data structures -   best in class for data analysis
Python data structures - best in class for data analysis
 
8. R Graphics with R
8. R Graphics with R8. R Graphics with R
8. R Graphics with R
 
Tree representation in map reduce world
Tree representation  in map reduce worldTree representation  in map reduce world
Tree representation in map reduce world
 
C Language Lecture 11
C Language Lecture  11C Language Lecture  11
C Language Lecture 11
 

Similar to Datasets

171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
sukrithlal008
 
R is a very flexible and powerful programming language, as well as a.pdf
R is a very flexible and powerful programming language, as well as a.pdfR is a very flexible and powerful programming language, as well as a.pdf
R is a very flexible and powerful programming language, as well as a.pdf
annikasarees
 
Introducing ms sql_server_updated
Introducing ms sql_server_updatedIntroducing ms sql_server_updated
Introducing ms sql_server_updated
leetinhf
 

Similar to Datasets (20)

Spark Dataframe - Mr. Jyotiska
Spark Dataframe - Mr. JyotiskaSpark Dataframe - Mr. Jyotiska
Spark Dataframe - Mr. Jyotiska
 
ppanda.pptx
ppanda.pptxppanda.pptx
ppanda.pptx
 
Introduction to pandas
Introduction to pandasIntroduction to pandas
Introduction to pandas
 
Tactical data engineering
Tactical data engineeringTactical data engineering
Tactical data engineering
 
MariaDB: Engine Independent Table Statistics, including histograms
MariaDB: Engine Independent Table Statistics, including histogramsMariaDB: Engine Independent Table Statistics, including histograms
MariaDB: Engine Independent Table Statistics, including histograms
 
Customer Clustering for Retailer Marketing
Customer Clustering for Retailer MarketingCustomer Clustering for Retailer Marketing
Customer Clustering for Retailer Marketing
 
Gur1009
Gur1009Gur1009
Gur1009
 
DataCamp Cheat Sheets 4 Python Users (2020)
DataCamp Cheat Sheets 4 Python Users (2020)DataCamp Cheat Sheets 4 Python Users (2020)
DataCamp Cheat Sheets 4 Python Users (2020)
 
fINAL Lesson_5_Data_Manipulation_using_R_v1.pptx
fINAL Lesson_5_Data_Manipulation_using_R_v1.pptxfINAL Lesson_5_Data_Manipulation_using_R_v1.pptx
fINAL Lesson_5_Data_Manipulation_using_R_v1.pptx
 
BA lab1.pptx
BA lab1.pptxBA lab1.pptx
BA lab1.pptx
 
Lecture 9.pptx
Lecture 9.pptxLecture 9.pptx
Lecture 9.pptx
 
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx171_74_216_Module_5-Non_relational_database_-mongodb.pptx
171_74_216_Module_5-Non_relational_database_-mongodb.pptx
 
PANDAS DATAFRAME.pdf
PANDAS DATAFRAME.pdfPANDAS DATAFRAME.pdf
PANDAS DATAFRAME.pdf
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
R is a very flexible and powerful programming language, as well as a.pdf
R is a very flexible and powerful programming language, as well as a.pdfR is a very flexible and powerful programming language, as well as a.pdf
R is a very flexible and powerful programming language, as well as a.pdf
 
Customer Clustering For Retail Marketing
Customer Clustering For Retail MarketingCustomer Clustering For Retail Marketing
Customer Clustering For Retail Marketing
 
You got schema in my json
You got schema in my jsonYou got schema in my json
You got schema in my json
 
R programming
R programmingR programming
R programming
 
R- Introduction
R- IntroductionR- Introduction
R- Introduction
 
Introducing ms sql_server_updated
Introducing ms sql_server_updatedIntroducing ms sql_server_updated
Introducing ms sql_server_updated
 

More from Robert Geofroy (11)

ESOL_COURSE_ INTRODUCTION_R_GEOFROY.pptx
ESOL_COURSE_ INTRODUCTION_R_GEOFROY.pptxESOL_COURSE_ INTRODUCTION_R_GEOFROY.pptx
ESOL_COURSE_ INTRODUCTION_R_GEOFROY.pptx
 
This is the introductory set of slides for the Basic English course.
This is the introductory set of slides for the Basic English course.This is the introductory set of slides for the Basic English course.
This is the introductory set of slides for the Basic English course.
 
Sampling Distribution of Sample proportion
Sampling Distribution of Sample proportionSampling Distribution of Sample proportion
Sampling Distribution of Sample proportion
 
Dm2021 binary operations
Dm2021 binary operationsDm2021 binary operations
Dm2021 binary operations
 
Set theory
Set theorySet theory
Set theory
 
Permutations 2020
Permutations 2020Permutations 2020
Permutations 2020
 
DM2020 boolean algebra
DM2020 boolean algebraDM2020 boolean algebra
DM2020 boolean algebra
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018
 
Course project solutions 2019
Course project solutions 2019Course project solutions 2019
Course project solutions 2019
 
Arguments and methods of proof
Arguments and methods of proofArguments and methods of proof
Arguments and methods of proof
 
Using sage maths to solve systems of linear equations
Using sage maths to solve systems of linear equationsUsing sage maths to solve systems of linear equations
Using sage maths to solve systems of linear equations
 

Recently uploaded

Recently uploaded (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 

Datasets

  • 5. Datasets ■ Without a plan, you will be unable to upload datasets. ■ We can make datasets in the notebooks ■ Consider the dataset: db1 = Dataset [{1, 2, 3, 4, 5}] ■ Shift-Enter to run the line of code and you will see the output as shown above.
  • 6. Datasets ■ Try the dataset: db2 = Dataset [{1, 2, 3, 4, 5}] ■ Add in three more elements to the dataset: db2 = Dataset [{1, 2, 3, 4, 5, 6, 7, 8}]
  • 8. Dataset Doubles ■ Try this: db2 = [{1, 2}, {2, 4}, {3, 6}]
  • 9. Dataset Doubles ■ Try this: db2 = [{1, 2}, {2, 4}, {3, 6}] and add n three more elements as we did before.
  • 10. More Doubles Try this: db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}] What is the output?
  • 11. More Doubles Try this: db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}] What is the output?
  • 12. More Doubles Try this: db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}] Add in another column and another row…
  • 13. More Doubles: Another column and another row… db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>}]
  • 14. Datasets Construct the following in a single notebook and save your notebook as “datasets.nb” in Wolfram Cloud in the “Statistics” folder on your account: ■ db1 = [{3, 6, 9, 12, 15}] ■ db2 = [{{1, 2}, {2, 4}, {3, 6}, {4, 8}, {5, 10}] ■ db3 = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 2, "b" -> 5|>, <|"a" -> 3, "b" -> 8|>}] ■ db4 = Dataset[{ <|"a" -> 1, "b" -> 70|>, <|"a" -> 2, "b" -> 71|>, <|"a" -> 3, "b" -> 74|>, <|"a" -> 4, "b" -> 80|>, <|"a" -> 5, "b" -> 73|>, <|"a" -> 6, "b" -> 75|>}] ■ db5 = Dataset[{ <|"a" -> 1, "b" -> "x", "c" -> {1}|>, <|"a" -> 2, "b" - > "y", "c" -> {2, 3}|>, <|"a" -> 3, "b" -> "z", "c" -> {3}|>, <|"a" -> 4, "b" -> "x", "c" -> {4, 5}|>, <|"a" -> 5, "b" -> "y", "c" -> {5, 6, 7}|>, <|"a" -> 6, "b" -> "z", "c" -> {}|>}]