import pandas as pd
import [Link] as plt
ep=pd.read_csv("[Link]")
ep=[Link]({0:"Arunachal
pardesh",1:"Assam",2:"Meghalaya",3:"Nagaland",4:"Mizoram",5:"Manipur",6:"Tripura",7:"West
Bengal (North)",8:"West Bengal
(South)",9:"Jharkhand",10:"Odish",11:"Chhattisgarh",12:"Bihar",13:"Madhyapradesh",14:"Uttarakha
nd",15:"Uttar Pradesh",16:"Haryana",17:"Himachal Pradesh",18:"Tamil
Nadu",19:"Karnataka",20:"Kerala",21:"Andhra Pradesh",22:"Maharashtra",23:"A&N Nicobar
Islands"})
d={0:"Arunachal
pardesh",1:"Assam",2:"Meghalaya",3:"Nagaland",4:"Mizoram",5:"Manipur",6:"Tripura",7:"West
Bengal (North)",8:"West Bengal
(South)",9:"Jharkhand",10:"Odish",11:"Chhattisgarh",12:"Bihar",13:"Madhyapradesh",14:"Uttarakha
nd",15:"Uttar Pradesh",16:"Haryana",17:"Himachal Pradesh",18:"Tamil
Nadu",19:"Karnataka",20:"Kerala",21:"Andhra Pradesh",22:"Maharashtra",23:"A&N Nicobar
Islands"}
l=[1993,1997,2002,2007,2012,2017]
ep=[Link]("STATE",axis=1)
ep=[Link](24,axis=0)
i=0
while i==0:
print("Command the operation:")
print("[Link] elephant population data")
print("[Link] population distribution of a specific year")
print("[Link] population progress of a specific state")
print("[Link] attributes of the data frame")
print("[Link] slice of data")
print("[Link] a specific value")
print("[Link] data visulalization using line chart")
print("Exit")
com=input("Please enter the command:")
if com=="Exit":
i=i+1
print("Thank you")
if com=="Access elephant population data":
print(ep)
if com=="Access population distribution of a specific year":
ye=int(input("Please enter the year:"))
if ye in l:
print([Link][:,"ELEPHANT POPULATION IN "+str(ye)])
else:
print("Census has not been conducted in the year you requested")
if com=="Access population progress of a specific state":
st=input("Please enter the state:")
if st in [Link]():
print([Link][st])
else:
print("Invalid state")
if com=="Access attributes of the data frame":
print("Following are the Attributes:")
print("Column labels")
print("Row labels")
print("Number of values")
print("Values")
print("Shape")
print("data type")
print("First n rows")
print("last n rows")
print("empty check")
at=input("Please enter the attribute:")
if at=="Column labels":
print([Link])
elif at=="Row labels":
print([Link])
elif at==("Number of values"):
print([Link])
elif at=="Values":
print([Link])
elif at=="Shape":
print([Link])
elif at=="data type":
print([Link])
elif at=="First n rows":
ro=int(input("Enter the first n number of rows to be extracted:"))
if ro in range(1,25):
print([Link](ro))
else:
print("Invalid row label")
elif at=="Last n rows":
ro=int(input("Enter the first n number of rows to be extracted:"))
if ro in range(1,25):
print([Link](ro))
else:
print("Invalid row label")
elif at=="Empty check":
print([Link])
else:
print("Given attribute is invalid")
if com=="Access slice of data":
r1=input("Enter the starting state:")
r2=input("Enter the ending state:")
c1=int(input("Enter the starting year:"))
c2=int(input("Enter the ending year:"))
if r1 and r2 in [Link]() and c1 and c2 in l:
print([Link][r1:r2,"ELEPHANT POPULATION IN "+str(c1):"ELEPHANT POPULATION IN
"+str(c2)])
else:
print("Please check inputed information")
if com=="Access a specific value":
ye=int(input("Enter the year:"))
st=input("Enter the state:")
if st in [Link]() and ye in l:
print("The required value is:",[Link][st,"ELEPHANT POPULATION IN "+str(ye)])
else:
print("Invalid data")import pandas as pd
import [Link] as plt
ep=pd.read_csv("[Link]")
ep=[Link]({0:"Arunachal
pardesh",1:"Assam",2:"Meghalaya",3:"Nagaland",4:"Mizoram",5:"Manipur",6:"Tripura",7:"West
Bengal (North)",8:"West Bengal
(South)",9:"Jharkhand",10:"Odish",11:"Chhattisgarh",12:"Bihar",13:"Madhyapradesh",14:"Uttarakha
nd",15:"Uttar Pradesh",16:"Haryana",17:"Himachal Pradesh",18:"Tamil
Nadu",19:"Karnataka",20:"Kerala",21:"Andhra Pradesh",22:"Maharashtra",23:"A&N Nicobar
Islands"})
d={0:"Arunachal
pardesh",1:"Assam",2:"Meghalaya",3:"Nagaland",4:"Mizoram",5:"Manipur",6:"Tripura",7:"West
Bengal (North)",8:"West Bengal
(South)",9:"Jharkhand",10:"Odish",11:"Chhattisgarh",12:"Bihar",13:"Madhyapradesh",14:"Uttarakha
nd",15:"Uttar Pradesh",16:"Haryana",17:"Himachal Pradesh",18:"Tamil
Nadu",19:"Karnataka",20:"Kerala",21:"Andhra Pradesh",22:"Maharashtra",23:"A&N Nicobar
Islands"}
l=[1993,1997,2002,2007,2012,2017]
ep=[Link]("STATE",axis=1)
ep=[Link](24,axis=0)
i=0
while i==0:
print("Command the operation:")
print("[Link] elephant population data")
print("[Link] population distribution of a specific year")
print("[Link] population progress of a specific state")
print("[Link] attributes of the data frame")
print("[Link] slice of data")
print("[Link] a specific value")
print("[Link] data visulalization using line chart")
print("Exit")
com=input("Please enter the command:")
if com=="Exit":
i=i+1
print("Thank you")
if com=="Access elephant population data":
print(ep)
if com=="Access population distribution of a specific year":
ye=int(input("Please enter the year:"))
if ye in l:
print([Link][:,"ELEPHANT POPULATION IN "+str(ye)])
else:
print("Census has not been conducted in the year you requested")
if com=="Access population progress of a specific state":
st=input("Please enter the state:")
if st in [Link]():
print([Link][st])
else:
print("Invalid state")
if com=="Access attributes of the data frame":
print("Following are the Attributes:")
print("Column labels")
print("Row labels")
print("Number of values")
print("Values")
print("Shape")
print("data type")
print("First n rows")
print("last n rows")
print("empty check")
at=input("Please enter the attribute:")
if at=="Column labels":
print([Link])
elif at=="Row labels":
print([Link])
elif at==("Number of values"):
print([Link])
elif at=="Values":
print([Link])
elif at=="Shape":
print([Link])
elif at=="data type":
print([Link])
elif at=="First n rows":
ro=int(input("Enter the first n number of rows to be extracted:"))
if ro in range(1,25):
print([Link](ro))
else:
print("Invalid row label")
elif at=="Last n rows":
ro=int(input("Enter the first n number of rows to be extracted:"))
if ro in range(1,25):
print([Link](ro))
else:
print("Invalid row label")
elif at=="Empty check":
print([Link])
else:
print("Given attribute is invalid")
if com=="Access slice of data":
r1=input("Enter the starting state:")
r2=input("Enter the ending state:")
c1=int(input("Enter the starting year:"))
c2=int(input("Enter the ending year:"))
if r1 and r2 in [Link]() and c1 and c2 in l:
print([Link][r1:r2,"ELEPHANT POPULATION IN "+str(c1):"ELEPHANT POPULATION IN
"+str(c2)])
else:
print("Please check inputed information")
if com=="Access a specific value":
ye=int(input("Enter the year:"))
st=input("Enter the state:")
if st in [Link]() and ye in l:
print("The required value is:",[Link][st,"ELEPHANT POPULATION IN "+str(ye)])
else:
print("Invalid data")import pandas as pd
import [Link] as plt
ep=pd.read_csv("[Link]")
ep=[Link]({0:"Arunachal
pardesh",1:"Assam",2:"Meghalaya",3:"Nagaland",4:"Mizoram",5:"Manipur",6:"Tripura",7:"West
Bengal (North)",8:"West Bengal
(South)",9:"Jharkhand",10:"Odish",11:"Chhattisgarh",12:"Bihar",13:"Madhyapradesh",14:"Uttarakha
nd",15:"Uttar Pradesh",16:"Haryana",17:"Himachal Pradesh",18:"Tamil
Nadu",19:"Karnataka",20:"Kerala",21:"Andhra Pradesh",22:"Maharashtra",23:"A&N Nicobar
Islands"})
d={0:"Arunachal
pardesh",1:"Assam",2:"Meghalaya",3:"Nagaland",4:"Mizoram",5:"Manipur",6:"Tripura",7:"West
Bengal (North)",8:"West Bengal
(South)",9:"Jharkhand",10:"Odish",11:"Chhattisgarh",12:"Bihar",13:"Madhyapradesh",14:"Uttarakha
nd",15:"Uttar Pradesh",16:"Haryana",17:"Himachal Pradesh",18:"Tamil
Nadu",19:"Karnataka",20:"Kerala",21:"Andhra Pradesh",22:"Maharashtra",23:"A&N Nicobar
Islands"}
l=[1993,1997,2002,2007,2012,2017]
ep=[Link]("STATE",axis=1)
ep=[Link](24,axis=0)
i=0
while i==0:
print("Command the operation:")
print("[Link] elephant population data")
print("[Link] population distribution of a specific year")
print("[Link] population progress of a specific state")
print("[Link] attributes of the data frame")
print("[Link] slice of data")
print("[Link] a specific value")
print("[Link] data visulalization using line chart")
print("Exit")
com=input("Please enter the command:")
if com=="Exit":
i=i+1
print("Thank you")
if com=="Access elephant population data":
print(ep)
if com=="Access population distribution of a specific year":
ye=int(input("Please enter the year:"))
if ye in l:
print([Link][:,"ELEPHANT POPULATION IN "+str(ye)])
else:
print("Census has not been conducted in the year you requested")
if com=="Access population progress of a specific state":
st=input("Please enter the state:")
if st in [Link]():
print([Link][st])
else:
print("Invalid state")
if com=="Access attributes of the data frame":
print("Following are the Attributes:")
print("Column labels")
print("Row labels")
print("Number of values")
print("Values")
print("Shape")
print("data type")
print("First n rows")
print("last n rows")
print("empty check")
at=input("Please enter the attribute:")
if at=="Column labels":
print([Link])
elif at=="Row labels":
print([Link])
elif at==("Number of values"):
print([Link])
elif at=="Values":
print([Link])
elif at=="Shape":
print([Link])
elif at=="data type":
print([Link])
elif at=="First n rows":
ro=int(input("Enter the first n number of rows to be extracted:"))
if ro in range(1,25):
print([Link](ro))
else:
print("Invalid row label")
elif at=="Last n rows":
ro=int(input("Enter the first n number of rows to be extracted:"))
if ro in range(1,25):
print([Link](ro))
else:
print("Invalid row label")
elif at=="Empty check":
print([Link])
else:
print("Given attribute is invalid")
if com=="Access slice of data":
r1=input("Enter the starting state:")
r2=input("Enter the ending state:")
c1=int(input("Enter the starting year:"))
c2=int(input("Enter the ending year:"))
if r1 and r2 in [Link]() and c1 and c2 in l:
print([Link][r1:r2,"ELEPHANT POPULATION IN "+str(c1):"ELEPHANT POPULATION IN
"+str(c2)])
else:
print("Please check inputed information")
if com=="Access a specific value":
ye=int(input("Enter the year:"))
st=input("Enter the state:")
if st in [Link]() and ye in l:
print("The required value is:",[Link][st,"ELEPHANT POPULATION IN "+str(ye)])
else:
print("Invalid data")