Assignment 2 Martina Ladinig

.docx

School

University of North Texas *

*We aren’t endorsed by this school

Course

4760

Subject

Computer Science

Date

Apr 24, 2024

Type

docx

Pages

3

Uploaded by EarlBoulderJackal12 on coursehero.com

B C\Windows\System32\Windc X * (CEC I IEEEUE S S £ BN RV E S A S VAL I [CEELY RS GATES S EV S AV S AN R CEER L I T (CEEL RSN GATEE SV E S S AV S VRN I AL EG REER I LR (CEEE IS GATES S EVa S AN T 0 S AV EE R EL REESO T ES TV - ol T https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html Please note that updating to Notebook 7 might break some of your extensions. [W 20:38:01.819 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension. pL) [I 2023-09-16 1.824 LabApp] JupyterLab extension loaded from C:\Users\martilanaconda3\Lib\site-packages\jupyte: [I 2023-09-16 20 1.824 LabApp] JupyterLab application directory is C:\Users\martilanaconda3\share\jupyter\lab [I 20:38:02.979 NotebookApp] The port 8888 is already in use, trying another port. [I 20:38:02.980 NotebookApp] The port 8889 is already in use, trying another port. [I 20:38:02.980 NotebookApp] The port 8890 is already in use, trying another port. [I 20:38:02.981 NotebookApp] Serving notebooks from local directory: C:\Users\marti\OneDrive\Desktop\Pandas- [I 20:38:02.982 NotebookApp] Jupyter Notebook 6.5.4 is running at: [I 20:38:02.982 NotebookApp] http://localhost:8891/?token=a385acfc98fc8ect7c28aUb78810f53c7ac76af78ecc8f32 [I 20:38:02.982 NotebookApp] or http://127.0.6.1:8891/?token=a385acfc98fc8ecd7c28aub78810f53c7ac76af78ecc8f32 [I 20:38:02.982 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmati [C 20:38:03.005 NotebookApp] . access the notebook, open this file in a browser: file:///C: /Users/nart:./AppData/Roallng/ jupyter/runtime/nbserver-20156-open. [T IVAEY T I ETS T TR i o TR U http://localhost:8891/?token=a385acfc98fc8ect7c28aub78810f53c7ac76af78ecc8F32 or http://127.0.0.1:8891/?token=a385acfc98fc8ecd7c28a4b78810F53c7ac76af78ecc8f32 0.00s - Debugger warning: It seems that frozen modules are being used, which may 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off 0.00s - to python to disable frozen modules. 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to dis: 59°F am o 857 PM & Clear mm Q Search o NSRS nn O Z Home Page - Select or createa X M@ Martina Ladinig Assignment2 - X | + L2 = a X C O localhost:8891/tree e * =600 Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions - Please note that updating to Notebook 7 might break some of your extensions. Don't show anymore ~ Jupyter Quit | Logout Files ~ Running Clusters Select items to perform actions on them. Upload Neww & 0o ~ m/ Name ¥ LastModified | File size O & Martina Ladinig Assignment 2.ipynb Running a minute ago 728 O D Titanic-Dataset.csv adayago 38.7kB > feud B Qs seOomcBe®e @O +a nemaw 500
Z Home Page - Selectorcreatearn X & Martina Ladinig Assignment2 - X + L2 = a X C @ localhost:8891/notebooks/Martina%20Ladinig%20Assignment%202.ipynb 2 % 600@ : Read the migration plan to Notebook 7 to lear about the new features and the actions to take if you are using extensions - Please note that updating to Notebook 7 might break some of your extensions. Don't show anymore : Jupyter Martina Ladinig Assignment 2 Last Checkpoint: 20 minutes ago Autosave Failed! [ Logout File Edt View Inset Cell Kemel Widgets Help B Trusted | Python 3 (ipykemel) S + < A B 4+ ¥ PRin B C MW Code v|| = In [2]: import pandas as pd In [4]: titanic = pd.read_csv ('Titanic-Dataset.csv') In [5]: titanic.shape out[5]: (891, 5) In [6]: import numpy as np titanic['Sex'] = np.where(titanic['Sex']=='female',1,0) In [7]: titanic['Sex'] out[7]: e o 3 ! 2 3 3 : 4 4 ] 886 e 887 > | 888 - 889 o 890 o Name: Sex, Length: 891, dtype: int32 < Jupyter Martina Ladinig Assignment 2 Last Checkpoint: 20 minutes ago Autosave Failed! A Logout File Edit View Insert Cell Kemel Widgets Help Trusted | Python 3 (ipykemnel) 5 + < A B 4+ ¥ PRin B C W Code v @ In [8]: titanic.describe() out[8]: Survived Pclass Sex Age count 891.000000 891.000000 891.000000 714.000000 mean 0.383838 2.308642 0.352413 29.699118 std 0.486592 0.836071 0.477990 14.526497 min 0.000000 1.000000 0.000000 0.420000 25% 0.000000 2.000000 0.000000 20.125000 50% 0.000000 3.000000 0.000000 28.000000 75% 1.000000 3.000000 1.000000 38.000000 max 1.000000 3.000000 1.000000 80.000000 In [9]: titanic.isnull().sum() out[9]: Survived 0 Pclass 2] Name ) Sex 2] Age 177 dtype: int64 In [13]: print(sum(titanic['Age'].isnull())) # == 177 missing values 177
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help