mayureshshilotri / 26-weeks-of-data-science Goto Github PK
View Code? Open in Web Editor NEWEmail Newsletter
Email Newsletter
Problem statement says : Create a graph for y = sin(x). X values should be from 0 to 10, incrementing in steps of 0.1
Solution provided for this in Week 6 is
def sine_wave():
'''Write your code here'''
series = np.linspace(-np.pi,(np.pi)+1)
sne = np.sin(series)
plt.plot(sne)
plt.xlabel('X')
plt.ylabel('Y')
plt.title('sin x')
plt.show();
sine_wave()
What about the below solution -
def sine_wave():
'''Write your code here'''
series = np.arange(10, step=0.1)
sne = np.sin(series)
plt.plot(sne)
plt.xlabel('X')
plt.ylabel('Y')
plt.title('sin x')
plt.show();
sine_wave()
Why series = np.linspace(-np.pi,(np.pi)+1) is like this instead of series = np.arange(10, step=0.1)
`def fahrenheit(T):
return ((float(9)/5)T + 32)
def celsius(T):
return (float(5)/9)(T-32)
temp = [0, 22.5, 40,100]
F_temps = map(fahrenheit, temp)
map(celsius, F_temps)
C_temps=map(celsius, F_temps)
l2=[i for i in C_temps]
`
W04 - Weather data frame weather_df2 is not defined any where
the code in the mean_temperatures is wrong:
0 # One Solution
1 mean_temperatures = {}
2
3 for month in range(1, 13):
4 mean_temperatures[month] = weather_df.loc[weather_df['Date/Time'].dt.month == month, 'Temp (C)'].mean()
5
6 pd.Series(mean_temperatures)
Code in line 4 should be: mean_temperatures[month] = weather_df.loc[pd.to_datetime(weather_df['Date/Time']).dt.month == month, 'Temp (C)'].mean()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.