Git Product home page Git Product logo

python_3_project's Introduction

python 3

your name


This project is a data science project that reads data from an online data source and displays the data to the user in dataframes.


In the program you are allowed to input a value which is the life expectancy of your choosing. the output is rows of data with a higher life expectancy than what you had put.


this line of code takes your input

    life_expentancy = int(input(
    "\ninput a minimum life expectancy value of your choice:\t"))

The code for accessing the rows that satisfy the condition is shown below

    more_life_expectancy = pandas_dataframe    [pandas_dataframe['lifeExp'] > life_expentancy]

The folowing code snippet output the data frames after the condition is satisfied

    print(more_life_expectancy)

Steps to follow when running this program.

  • download python 3 and install

  • install pip in your system ( this is only for linux users )

  • create a python file and write your program

        import pandas as pd
    
        data_store = 'http://bit.ly/2cLzoxH'
    
        pandas_dataframe = pd.read_csv(data_store)
    
    
        print("\nThe full list of the countries is printed below:\n")
        print(pandas_dataframe)
    
    
    
        life_expentancy = int(input(
            "\ninput a minimum life expectancy value of your choice:\t"))
    
        more_life_expectancy = pandas_dataframe[pandas_dataframe['lifeExp']
                                                > life_expentancy]
        print("\n\nfull list of countries with a life expextancy greater than " +
            str(life_expentancy) + "\n")
        print(more_life_expectancy)
  • after completing your program open your command prompt or terminal and type the following command:

        C:\Users\edwin\OneDrive\Desktop\New folder> python name_of_your_file.py
  • finally, your output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.