1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Python & Machine Learning (with Analytics Vidhya Hackathons)

Exercise

Case study - Who is eligible for loan?

Introduction - Analytics Vidhya (AV) DataHack

At Analytics Vidhya, we are building a knowledge platform for data science professionals across the globe. Among several things, we host several hackathons for our community on our DataHack platform. The case study for today's problem is one of the practice problem on our platform. You can check out the practice problem here.

The case study - Dream Housing Finance

Dream Housing Finance company deals in all home loans. They have a presence across all urban, semi-urban and rural areas. Customers first apply for a home loan after that company validates the customer's eligibility. The company wants to automate the loan eligibility process (real-time) based on customer detail provided while filling online application form.

Let's start with loading the training and testing set into your python environment. You will use the training set to build your model, and the test set to validate it. Both the files are stored on the web as CSV files; their URLs are already available as character strings in the sample code.

You can load this data with the pandas.read_csv() function. It converts the data set to a python dataframe. In simple words, Python dataframe can be imagined as an equivalent of a spreadsheet or a SQL table.

Instructions

100 XP
  • train.head(n) helps to look at top n observation of train dataframe. Use it to print top 5 observations of train.
  • len(DataFrame) returns the total number of observations. Store the number of observations in train data in variable train_length
  • DataFrame.columns returns the total columns heading of the data set. Store the number of columns in test datasetin variable test_col