GithubHelp home page GithubHelp logo

26-weeks-of-data-science's Issues

Issue in Mini Challenge 1 of Week 5

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)

Issue with an example used for Map function. Week 2.

The issue is with the following code:

`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)

When the output is enquired by taking the map entities in a list. It is empty

map(celsius, F_temps)

in order to see the elements

C_temps=map(celsius, F_temps)
l2=[i for i in C_temps]
`

Week 4 - .mean() error

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()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.