<jupyter_start><jupyter_text>This is te heading  this is the second heading *thsi is esrg*<jupyter_code>import numpy as np
np.power(2,4)
y=[2,4,6,8,10]
np.power(y,4)
np.sqrt(4)
np.sqrt(8)
import numpy
import pandas as pd
import matplotlib.pyplot as plt
dict1 = { "name" : [ 'SSS','DD','DDD1'],
         "MARKS" :[92,34,24],
         "city":['rampur', 'kolkolta', 'butterfly']
}
df=pd.DataFrame(dict1) # making excel sheet
df
df.to_csv('friends1.csv') # export excel sheet
df.to_csv('friends1.csv', index= False) # no index
df.head(2) # first 2 rows, n shows no : of row
df.tail(2) # last 2 row , n shows no: of row
df.describe() # statical analysis
a1 = pd.read_csv('aa.csv') # to define externally created csv
a1 # to show
a1['marks'][0] = 25 # to change specfic value on csv 0 shows index
a1
a1['graade'][0] ='C'
a1
a1.index = [ 'first', 'second', 'third', 'fourth', 'fifth']
a1 # for row acces index is used and for column, column is used
ser = pd.Series(np.random.rand(34)) # making series
type(ser) # show the type, series is the data structure of pandas
newdf=pd.DataFrame(np.random.rand(334,5), index = np.arange(334))
#In above line we created the dataframe(Data structure of pandas)
#newdf is the varaible which store the Data frame 
#this data frame create the random no: with row 334 and 5 column
newdf
type(newdf)
newdf.describe() # show stats analysis
newdf.dtypes#show data types of columns (remember one column contain same data types)
newdf[0][0] = "ESRG" # ON Data frame oth column on 0th row no: is replaced by ESRG
newdf.dtypes # on this output float is replaced by object because of the string in column
newdf.head()
newdf.index # shows rows info(as we know in pandas we use row as index)
newdf.columns #shows columns info
newdf.to_numpy()
newdf[0][0] = 0.0245
newdf.head()
newdf.T # TRANSPOSE THE MATRIX
newdf
newdf.head()
newdf.sort_index(axis=0) # show ascending order of data
newdf.sort_index(axis=1, ascending=False) # asscess is equal to 0 = row and axis is equal to 1 is column
newdf.head()
type(newdf[0])
newdf2= newdf # view the dataframe newdf into newdf2 (remeber this is not copy the dta frame this is only view the data frame)
newdf2[0][0]= 0.78534453453
newdf.head() # in above command we changed the newdf2 0x0, but changes ae also occur in newdf also 
newdf2.head()
newdf2= newdf.copy() # comand for copy the data frame data into another data frame
newdf2.head()
newdf.head()
newdf.loc[0,0] = 654 # for remove the warning loc used (0,0) first is row and secoond is colummn
newdf.head()
newdf.columns = list("ABCDE") #for replacing the columns name from numeric to alphabatic
newdf
newdf.loc[0,0] = 678 # now we can changing the index and for using we use [numeric , aplha] but if we use [0,0] this then there is another row is created
newdf
newdf.loc[0,'A'] = 678 # now we can change the index and for using we use [numeric,aplha]
newdf.head()
newdf=newdf.drop(0,axis=1) # for drop the any row or coloumns by using drop(0,1 for column and 0 for row) 
newdf
newdf.loc[[1,2],['C','D']] # SHOW SPECIFIC ROW AD COLUMN
newdf.loc[[1,2], :] # FOR SHOW ALL COLUMNS
newdf.loc[:,['C','D']]# FOR SHOW ALL ROWS
newdf.loc[(newdf['A']<0.3) & (newdf['C']>0.1)] # conditions for show specifc columns and rows
newdf.iloc[0,4] # show by idexing no matter name of rows and columns
newdf.head()
newdf.iloc[0,4]
newdf.iloc[0,3]
newdf.iloc[[0,1], [1,2]]
newdf.drop(['A','D'], axis=1, inplace= True) # original data frame modifed by inplace = True
newdf.drop([1,2])
newdf.reset_index() # for indexing after droped rows
newdf.reset_index(drop=True, inplace=True) # for remove index column
newdf.head(3)
newdf['B'].isnull() # for check null value
newdf
newdf['B'] = None # for assing vlue on whole B
newdf
newdf['B'].isnull()
newdf<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12725344644750794, 'fraction_numerical': 0.035790031813361614, 'mean_word_length': 4.813559322033898, 'pattern_counts': {'":': 1, '<': 6, '<?xml version=': 0, '>': 6, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '650196', 'license': 'MIT', 'n_tokens_mistral': 1435, 'n_tokens_neox': 1375, 'n_words': 499, 'path': 'practiceesrg.ipynb', 'repo_name': 'ESRG-IST/practice', 'size': '3772'}