#!/usr/bin/env python# coding: utf-8# In[1]:print("hello world");# In[2]:c = input("enter")print("c= " + c)# In[3]:import numpy as npimport pandas as pd# In[7]:data = pd.read_csv('iris.csv')data.head()# In[12]:for i in range(0,5): for j in range(0,i): print('*', end=' ') print()# In[13]:data.info()# In[14]:data.describe()# In[15]:data.filter(['sepal_length','petal_length']).head()# In[17]:data.sort_values(by=['petal_length'])# In[18]:import matplotlib.pyplot as plt# In[22]:plt.bar(data['species'], data['sepal_length'])plt.title("Iris Dataset")plt.legend(["bar"])plt.show()# In[ ]:
If you have any doubts/suggestion/any query or want to improve this article, you can comment down below and let me know. Will reply to you soon.
Download Codingkaro App and learn DSA, prepare for Interview and get the best Contest Reminder App for Free.
1 Comments
#!/usr/bin/env python
ReplyDelete# coding: utf-8
# In[1]:
print("hello world");
# In[2]:
c = input("enter")
print("c= " + c)
# In[3]:
import numpy as np
import pandas as pd
# In[7]:
data = pd.read_csv('iris.csv')
data.head()
# In[12]:
for i in range(0,5):
for j in range(0,i):
print('*', end=' ')
print()
# In[13]:
data.info()
# In[14]:
data.describe()
# In[15]:
data.filter(['sepal_length','petal_length']).head()
# In[17]:
data.sort_values(by=['petal_length'])
# In[18]:
import matplotlib.pyplot as plt
# In[22]:
plt.bar(data['species'], data['sepal_length'])
plt.title("Iris Dataset")
plt.legend(["bar"])
plt.show()
# In[ ]:
If you have any doubts/suggestion/any query or want to improve this article, you can comment down below and let me know. Will reply to you soon.