Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Statsmodels Multiple Regression Syntax Error
Post: RE: Statsmodels Multiple Regression Syntax Error

post a reproducible code-example...with representative features in your dataframe
Caprone Data Science 2 256 Jun-27-2021, 01:46 PM
    Thread: Suitable Data Modelling Packages
Post: RE: Suitable Data Modelling Packages

algorithms you need depend on the type of data you have and the task to task to achieve; for example: if you try to predict future events based on past events (this seems your task) you are dealing wi...
Caprone Data Science 3 327 Jun-27-2021, 01:43 PM
    Thread: Compile list of dictianories out of another list of dictianories by certain keys
Post: RE: Compile list of dictianories out of another li...

(Jun-05-2021, 06:28 PM)perfringo Wrote: Maybe I am missing something but it seems that simple filtering functions would do. Something like: lod = [{"id": 1, "a": 1, "b": 2, "result": 9.82}, ...
Caprone General Coding Help 10 660 Jun-06-2021, 03:49 PM
    Thread: Adding a new column to a Panda Data Frame
Post: RE: Adding a new column to a Panda Data Frame

with numpy, like ifesle statment in R... df['l3'] = np.where(df['l1'] > df['l2'], df['l1'], df['l2'])
Caprone Data Science 2 321 Jun-05-2021, 06:29 PM
    Thread: Basic help with a dataframe
Post: RE: Basic help with a dataframe

(May-21-2021, 05:49 PM)stylingpat Wrote: Hmm no one has any idea how to access the timestamp in a dataframe?? look at this simple example import pandas as pd import numpy as np df = pd.DataFrame(n...
Caprone Data Science 2 622 May-21-2021, 06:52 PM
    Thread: Help with linearRegression/cross_val_score
Post: RE: Help with linearRegression/cross_val_score

(May-20-2021, 08:24 PM)vasu2798 Wrote: (May-20-2021, 08:08 PM)Caprone Wrote: sorry, but have You understood what cv does ??? how many scores You thought 5 folds cv would returns?? Hey Sorry. I g...
Caprone Data Science 5 521 May-21-2021, 01:37 PM
    Thread: Help with linearRegression/cross_val_score
Post: RE: Help with linearRegression/cross_val_score

(May-16-2021, 02:45 PM)vasu2798 Wrote: Hi. I'm trying to find the cross validation score using Linear regression model but am getting scores more than 1. I have attached the data, code as well as th...
Caprone Data Science 5 521 May-20-2021, 08:08 PM
    Thread: Using Python and scikitlearn, how to output the individual feature dependencies?
Post: RE: Using Python and scikitlearn, how to output th...

I don't see the problem; that is your Gini importance feature ranking...of course you can tune your algorithm , but the logic is always the same
Caprone Data Science 8 1,157 May-20-2021, 08:02 PM
    Thread: Convert several columns to int in dataframe
Post: RE: Convert several columns to int in dataframe

please format your code You can't show it that way ; probably missing values in your data, chek that: df.isnull().sum()
Caprone Data Science 2 266 May-20-2021, 07:53 PM
    Thread: apply(pd.Series) until no more array
Post: RE: apply(pd.Series) until no more array

HI You can take advantage of json_normalize method and list_comp combo: data1 = [{'foo': {'baz': 30}, 'bar': {'baz': 16}}, {'foo': {'baz': 45}, 'bar': {'baz': 8}}] data2 = [{'foo': {'baz': 15...
Caprone Data Science 1 537 Apr-17-2021, 08:45 PM

User Panel Messages

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