<jupyter_start><jupyter_text>introduction to pandas - enviroment setting:pd.set_option('precision', 1)pd.option.display.float_format = {:.02f}- index: [], ., loc, iloc, ix.set_index()  and &  or |  not ~- attribution:columns, index, name, values, shape, size, dtype- method:head(), describe()- plot(kind = "bar")hist()pie()bar()kde()- sort_values(by = columns_name, inplace = True)sort_index()- idmax() = argmax().ravel()unique()values_counts()duplicated()drop_duplicates()isnull()fillna(what)map() apply()- str.upper()str.lower()str.len()- mutilindexpivot_table(values, index, columns)stack(level = (0,1))unstack(level = 2)transpose()multi-index  idx - merge()concat()- groupgroupby().get_group().groups.keys()  Introduction to Matlibplot.pyplot fig, ax = plt.subplot(row, columns, figsize = (12,12))plot(x,y, color, linewidth, label, lines)ax.legandax.labelax.xlimax.ylim``` pythonimport numpy as np |import matplotlib.pyplot as plt from mpl_toolkits.mplot3d.axes3d import Axes3Df = lambda x, y: x**2 + y**2x,y = np.linspace(-1,1,100), np.linspace(-1,1,100)x,y = np.meshgrid(x,y)fig = plt.figure()ax = fig.gca( projection='3d')ax.plot_surface(x,y,f(x,y), color = "yellow")plt.show()```                                                                                                                                                                                                                                                                                                                                                                                                                                                             Introduction of scipy - scipy.optimizebrentqminimize(function, initial, method)bisect(function, initial)newton(function, initial)fsolve: multi-dimention don't use it unlessfixed_point(function, initial)fminbound(function, a, b) minimize function with boundary- scipy.integratequad approximating of polynomial- scipy.statspdf, cdf, pps, rvs.nrom(shape, loc, scale) Y = c + dXgradient, intercept, r_value, p_value, std_err = linregress(x,y)- numpy.linalg  Introduction of optimization  1. Bisectionrequire boundary point value at opposite sign.2. Newton-Raphsonusing the information of second moment, expand the function at xn$$ f(x_{n+1}) = f(x_n) + f(x_n)'\times(x_n - x_{n+1}) $$We suppose $f(x_{n+1}) = 0$ so:$$x_{n+1} = x_n -\frac{f(x_n)}{f'(x_n)} $$3. Nelder-Meadsort transpose extend inner shrink<jupyter_code>import numpy as np
a = np.linspace(0,3,4)
b = np.linspace(0,4,5)
a,b = np.meshgrid(a,b)
print((b-a).sum())<jupyter_output>10.0
{'fraction_non_alphanumeric': 0.14069179945588806, 'fraction_numerical': 0.01671200932763311, 'mean_word_length': 2.5601659751037342, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '503720', 'license': 'MIT', 'n_tokens_mistral': 816, 'n_tokens_neox': 797, 'n_words': 167, 'path': 'Lesson_7.ipynb', 'repo_name': 'silenceon/FML_lesson_1', 'size': '2573'}