Friday, 8 May 2020

4 Why do we have 3 csv data files

Dear Friends,

Please go through my video below.

https://www.youtube.com/watch?v=znnsCPPYOHU&feature=youtu.be

Please post comment if you have any queries. I glad to assist you.

Please subscribe to my channel.

Press bell button to receive notification for new videos and like the video if like it.

3 How to download titanic data set from kaggle website.


Dear Friends,

Please go through my video below.

https://www.youtube.com/watch?v=a8I_NhYZljo&feature=youtu.be

Please post comment if you have any queries. I glad to assist you.

Please subscribe to my channel.

Press bell button to receive notification for new videos and like the video if like it.


2 How to check python version and opening notebook


Dear Friends,

Please go through my video below.

https://www.youtube.com/watch?v=tKUzlwOFtvQ&feature=youtu.be

Please post comment if you have any queries. I glad to assist you.

Please subscribe to my channel.

Press bell button to receive notification for new videos and like the video if like it.


1 How to Install Anaconda especially on Windows 10


Dear Friends,

Please go through my video below.

https://www.youtube.com/watch?v=n5ojYbnKuD4

Please post comment if you have any queries. I glad to assist you.

Please subscribe to my channel.

Press bell button to receive notification for new videos and like the video if like it.


Friday, 31 January 2020

How to write a csv file in python?

# This is tested on Jupytor Notebook.
# Note: Ensure the data frame name is df which is loaded into your python notebook. 

# Importing the packages
import pandas as pd

# Write to file
def write_file(df):       
    df.to_csv('df_results.csv',index = False)

# Calling the method
df = write_file(df)

# This write the results of df into file name df_results.csv

How to read a csv file in python?

# This is tested on Jupytor Notebook.
# Note: Ensure the data frame name is df which is loaded into your python notebook.

# Importing the packages
import pandas as pd

# Read from file
def read_file(file_name):
    df = pd.read_csv(file_name,error_bad_lines=False)
    return df

# Calling the method
df = read_file('df.csv')

# Display first 5 records
df.head()

# Check size of the data frame
df.shape

Write a Python method to read from csv file.

# This is tested on Jupytor Notebook.
# Note: Ensure the file name is 'df.csv' which is loaded to your present directory.

# Importing the packages
import os
import pandas as pd

# Read from file
def read_file(file_name): 
    df = pd.read_csv(file_name,error_bad_lines=False)
    return df

# Calling the method
df = read_file('df.csv')

# Display first 5 records
df.head()

# Check size of the data frame
df.shape