8. Implementing programs using written modules and Python Standard Libraries (pandas, numpy. Matplotlib, scipy)

 

8. Implementing programs using written modules and Python Standard Libraries (pandas, numpy. Matplotlib, scipy)

PANDAS

import pandas as pd

df = pd.read_csv('Data.csv')

print(df.to_string())

 

NUMPY

 

import numpy

arr = numpy.array([4, 5,7,8])

print(arr)

 

 

Matplotlib

 

from matplotlib import pyplot as plt

import numpy as np

 

xpoints = np.array([0, 6])

ypoints = np.array([0, 250])

 

plt.plot(xpoints, ypoints)

plt.show()

 

scipy

 

from scipy import constants

 

print(constants.liter)

 

import numpy as np

from scipy.sparse import csr_matrix

 

arr = np.array([0, 0, 0, 0, 0, 1, 1, 0, 2])

 

print(csr_matrix(arr))

Comments

Popular posts from this blog

1. Identification and solving of simple real life or scientific or technical problems, and developing flow charts for the same.

G3151-Problem Solving and Python Programming (2021 Regulations Anna University,Chennai)

12. Developing a game activity using Pygame like bouncing ball, car race etc.