Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Formula with elements of list - If-condition regarding the lists elements
Post: RE: Formula with elements of list - If-condition r...

Hope below code clarifies your doubt. import numpy as np lst1 = [1.3, 2.4, 3.7, 4.4, 5.5, 5.8] x1 = np.array(lst1) x2+3 if 1.3 in lst1 else x2+10 y = x1 + x2 print(y)
nnk Data Science 2 2,740 May-08-2020, 01:41 PM
    Thread: Doubt in Linear Reg by 'MLE' method
Post: RE: Doubt in Linear Reg by 'MLE' method

I can see parenthesis is not closed for below statement in your code L=(len(x)/2*np.log(2*np.pi)+len(x)/2*np.log(sigma**2)+1/(2*sigma**2)*sum((y-y_exp**2))) Hope this is enough... I can see parenth...
nnk Data Science 2 1,887 May-08-2020, 12:19 PM
    Thread: how to solve the 'NO SUCH DIRECTORY OR FILE' in pandas, python
Post: RE: how to solve the 'NO SUCH DIRECTORY OR FILE' i...

I tried this and it worked for me.... But you make sure your file is in correct path... import pandas as pd df = pd.read_csv(r'c:\Users\Admin\Downloads\weather.csv') print("The size of the data frame...
nnk Data Science 10 15,423 May-08-2020, 07:45 AM
    Thread: array coding problem
Post: RE: array coding problem

I tried with below and got same result as previous one: p=np.array([[[0, 1, 2], [3, 4, 5], [6, 7, 8]], [[0, 1, 2], [3, 4, 5], [6, 7, 8]], [[0, 1, 2],...
nnk Data Science 3 1,986 May-08-2020, 05:54 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020