Discussion community for DS, ML, IOT, AI, DEEP LEARNING and much more from Main Channel @kdnuggets and discuss @DatascienceChats
@yashbhoi661 What is the process to get these courses?
Читать полностью…Data Analyst Roundtable
https://www.linkedin.com/posts/dataglobal-hub_data-ai-technology-activity-7190684016381947904-X6aU?utm_source=share&utm_medium=member_ios
Anyone knows how to apply PINNs on dataset??
Читать полностью…I wanted to ask about PINNs and how to apply on dataset
Читать полностью…We are hiring Data Scientist with Gen AI Experience.
Location - Baner (Pune) (3 Days WFO)
Experience – 4 to 8 Years
Primary Skill - (Gen AI)
Secondary Skill - ML, Python, NLP,
Company:- Xoriant
To get the descriptive statistics like mean, count, etc., for specific columns like 'Price' in a pandas DataFrame that contains columns of data types int64
and float64
, you can follow these steps:
1. Create a DataFrame with columns of data types int64
and float64
.
2. Use the describe()
method to get an overview of the statistics for all columns.
3. To specifically get statistics for the 'Price' column, you can use the describe()
method with the include
parameter set to ['float64', 'int64']
to include only columns of these data types.
Here is an example code snippet to illustrate this:
import pandas as pd
# Creating a sample DataFrame with 'int64' and 'float64' columns
data = {
'Event': ['Music', 'Poetry', 'Music', 'Comedy', 'Poetry'],
'Price': [1500, 800, 1500, 800, 1200],
'Quantity': [100, 50, 80, 120, 90]
}
df = pd.DataFrame(data)
# Get an overview of the statistics for all columns
print(df.describe())
# Get statistics specifically for the 'Price' column
print(df['Price'].describe())
describe()
to get an overview of statistics for all columns.df['Price'].describe()
.include
parameter of the describe()
method, you can focus on specific columns based on their data types, such as 'Price' in this case.
Читать полностью…
Great
But if I have
Int64
And
Float 64
For many rows and columns
How can I get the include of price or anything
Hi guys
What does it object. And include mean here
And do you video to explain it
df.describe (include=[“object”])
Freelance hiring for a solution architect who has 10+years of experience in AI &ML.If interested, please DM me.
Читать полностью…Urgent Need of 10 people👍
Content Marketing Work
Work from home 🏡🏠💯
Just you need Smartphone 📲and internet connection 🤓🤓
For Details MSG
Hii I need help with LLM prompt.. please inbox
Читать полностью…Hey ... Is Anyone here expert in ML..or knows ML in deep ... basically about neural networks?
Читать полностью…Anyone up for a paid assignment of Market basket analysis
I will pay 1000
Great my friend I’ll try
Thx
Not sure, but I hope this helps:
The code df.describe(include=[“object”])
is used to generate descriptive statistics for a pandas DataFrame df
, specifically for columns of data type object
. The object
data type in pandas is used to represent categorical variables or strings.
To add a new column to a pandas DataFrame df
, you can use the following methods:
1. Add columns at the end of the table: df["new_column_name"] = [values]
, where values
is a list of values for the new column.
2. Add columns at a specific index: df.insert(index, "new_column_name", [values])
, where index
is the index where the new column should be inserted.
3. Add columns with the loc
method: df.loc[:, "new_column_name"] = [values]
, where values
is a list of values for the new column.
4. Add columns with the assign
function: df = df.assign(new_column_name=[values])
, where values
is a list of values for the new column.
To add a new column to a pandas DataFrame df
based on a given condition, you can use the following methods:
1. List comprehension: df["new_column_name"] = [expression for x in df["existing_column_name"]]
, where expression
is a Python expression that evaluates to the value of the new column for each row.
2. DataFrame.apply(): df["new_column_name"] = df["existing_column_name"].apply(function)
, where function
is a Python function that takes a value from the existing column as input and returns the value of the new column.
3. DataFrame.map(): df["new_column_name"] = df["existing_column_name"].map(function)
, where function
is a Python function that takes a value from the existing column as input and returns the value of the new column.
4. numpy.where(): df["new_column_name"] = numpy.where(condition, expression_if_true, expression_if_false)
, where condition
is a Boolean condition that determines whether the expression expression_if_true
or expression_if_false
should be used to calculate the value of the new column.
For example, to add a new column called price
to a pandas DataFrame df
based on the value of an existing column called event
, you can use the following code:df["price"] = numpy.where(df["event"] == "Music", 1500, 800)
This code sets the value of the price
column to 1500 if the value of the event
column is "Music", and 800 otherwise.
This code is used to generate descriptive statistics for a given dataframe df
in Python using the pandas library. Specifically, it is generating statistics for columns that are of object
data type.
In pandas, object
is a data type used to represent categorical variables or strings. When you call df.describe()
, it generates statistics such as count, mean, standard deviation, minimum, and maximum for numerical columns. However, these statistics are not meaningful for categorical variables or strings.
Therefore, the include=[“object”]
parameter is used to request descriptive statistics for categorical variables or strings. When you call df.describe(include=[“object”])
, it generates statistics such as count, unique values, top values, and frequency for categorical variables or strings.
Here's an example of what the output might look like:
| | name | gender |
|---|---|---|
| count | 1000 | 1000 |
| unique | 500 | 2 |
| top | John | Male |
| freq | 25 | 500 |
In this example, the name
column has 1000 unique values, and the gender
column has 2 unique values (Male and Female). The top
value for name
is John, which appears most frequently, and the freq
value for gender
is 500, indicating that half of the rows have a value of Male.
Hi All,
Freelance opportunity,
One of my friends consulting company is looking for raspberry pie, iot, telcom solution architect.
If anyone interested.. for more details please call/text on +91 9866851515 or share your profile on saraswathi@vencertec.