<jupyter_start><jupyter_text>n=<jupyter_code>eval('3+4/5*6')
"hello Mike".find("Mike")
"ABC".replace("AB", "ab")
t=(2,3,4,56,6)
a=t
a<jupyter_output><empty_output><jupyter_text>***IMP***<jupyter_code>a=(1,2,[4])
a[2]
a[2][0]<jupyter_output><empty_output><jupyter_text>DICT<jupyter_code>a={'a':1,'c':2}
a
a.keys()
z=a.values()
z
for i in z:
    print(i)
d={'a':1,'a':2}
d<jupyter_output><empty_output><jupyter_text>SET<jupyter_code>s={'a',1,6,2}
s
s.add('keshav')
s
s.remove(6)
s
2 in s
a=6
if (a==6)==1:
    print('Yes')
if (a==6)==True:
    print('Yes')<jupyter_output>Yes
Yes<jupyter_text>***LOOPS***<jupyter_code>for i,x in enumerate(['P','Q','R']):
    print(i,x)
2*'1'<jupyter_output><empty_output><jupyter_text>FILE<jupyter_code>with open('k.txt','w') as file:
    file.write('keshav singh\nPradeep Singh\n<NAME>')
#     file.close()
file.name
with open('k.txt','r') as file:
    print(file.read())
with open('k.txt','r') as file:
    print(file.readlines())
with open('k.txt','r') as file:
    print(file.readline())
    print(file.readline())
    print(file.readline())
with open('k.txt','r') as file:
    print(file.readline(4))
    print(file.readline())
    print(file.readline())<jupyter_output>kesh
av singh

Pradeep Singh<jupyter_text>Pandas<jupyter_code>with open('k.csv','w') as file:
    file.write('name,year\nKeshav Singh,1999\nPradeep Singh,2001\nPriya Jain,1999')
import pandas as pd
df=pd.read_csv('k.csv')
df
df['year'].unique()
df[['name','year']][df['year']>1999]<jupyter_output><empty_output><jupyter_text>numpy - 1-D<jupyter_code>import numpy as np
a=np.array([0,2,4,7,2])
a
a+10
type(a)
a.size
a.ndim
a.shape
a.dtype<jupyter_output><empty_output><jupyter_text>- Vector addition and subbtraction<jupyter_code>a=np.array([1,1,1,1])
c=np.array([0,1,0,1])
a*c
np.dot(a,c)
a+c
a-c
np.linspace(-2,2,num=5)
np.linspace(-2,2,num=10)
import matplotlib.pyplot as plt
x=np.linspace(0,2*np.pi,100)
plt.plot(x,np.sin(x))
plt.show()<jupyter_output><empty_output><jupyter_text>- 2-D<jupyter_code>a2=np.array([[12,34,7],[23,1,6],[34,67,21]])
a2
a2.ndim
a2.size
a2.shape
a2.dtype
a3=np.array([[1,4,7],[2,1,1],[4,7,1]])
a3
np.dot(a2,a3)
a2*a3<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.230980751604033, 'fraction_numerical': 0.05178735105407883, 'mean_word_length': 7.3961538461538465, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '10', 'dir': 'jupyter-structured-clean-dedup', 'id': '186244', 'license': 'MIT', 'n_tokens_mistral': 1106, 'n_tokens_neox': 1076, 'n_words': 133, 'path': 'Coursera/Python for applied Data Science and AI/index.ipynb', 'repo_name': 'Dhaneshgupta1027/Python', 'size': '2189'}