iordan_93 Trainer 407 Точки

## Домашно за лекция 1. Python Crash Course

Здравейте, колеги,

Домашното за първата лекция е качено. За да го отворите, трябва да имате Jupyter Notebook (който показах как се инсталира). Разархивирате папката, отваряте http://localhost:8888, навигирате до там, където сте разархивирали, отваряте notebook-a, попълвате го и предавате.

Надявам се първото задание да не е много трудоемко, но все пак задачите са направени така, че да бъдат малко предизвикателни :).

За технически въпроси по домашното, може да питате в тази тема, а за по-генерални въпроси - имаме си цяла секция във форума :).

Тагове:
0

Hi

(Sorry for the english but its faster for me to write with it ..)

Is there someone who have success to run that solution?

I tried using Jupyter  but on the second point where there is check for outliers I get error. Can someone suggests whats wrong?

plotlib.rcParams["text.usetex"] = True

def plot_histogram(data, axis, xlabel, ylabel):
axis.hist(data, bins = 5, normed = 1)
axis.set_xlabel(xlabel)
axis.set_ylabel(ylabel)

f, (ax1, ax2) = plt.subplots(2, figsize = (5, 6))
plot_histogram(gas_data.temp_diff, ax1, r"$\Delta T\ [^{\circ} \mathrm{C}]$", r"$\mathrm{Frequency}$")
plot_histogram(gas_data.power, ax2, r"$C\ [\mathrm{kWh}]$", r"$\mathrm{Frequency}$")

f.tight_layout()
plt.show()

Error:

RuntimeError: LaTeX was not able to process the following string:
b'lp'
Here is the full report generated by LaTeX: 

*Iordan, I think its really nice that you provide solutions like that so we can try to understand how these tasks are solved but please attach some comments in the code what are you doing and why you're doing it. I know we can go and search for every line but I think its time consumming. For me personally its quite easier to read explanation in the specific example of the line in the code..

Thanks

0
iordan_93 Trainer 407 Точки

Hi,

First of all, that's not part of your homework. It's a part of the data analysis I provided as an example.