#pandastricks search results

🐼🤹‍♂️ pandas trick #100! 🎉 Want to read a HUGE dataset into pandas but don't have enough memory? Randomly sample the dataset *during file reading* by passing a function to "skiprows" See example 👇 Thanks to @TedPetrou for this trick! 🙌 #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #100! 🎉

Want to read a HUGE dataset into pandas but don't have enough memory?

Randomly sample the dataset *during file reading* by passing a function to "skiprows"

See example 👇

Thanks to @TedPetrou for this trick! 🙌

#Python #DataScience #pandastricks

🐼🤹‍♂️ pandas trick #94: Want to save a *massive* amount of memory? Fix your data types: ➡️ 'int8' for small integers ➡️ 'category' for strings with few unique values ➡️ 'Sparse' if most values are 0 or NaN More info: pythonspeed.com/articles/panda… by @itamarst #Python #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #94:

Want to save a *massive* amount of memory? Fix your data types:

➡️ 'int8' for small integers
➡️ 'category' for strings with few unique values
➡️ 'Sparse' if most values are 0 or NaN

More info: pythonspeed.com/articles/panda… by @itamarst

#Python #pandastricks

🐼🤹‍♂️ pandas trick #98: Problem: Your DataFrame is in "wide format" (lots of columns), but you need it in "long format" (lots of rows) Solution: Use melt()! ⛄➡️💧 See example 👇 Long format is better for analysis, transformation, merges... #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #98:

Problem: Your DataFrame is in "wide format" (lots of columns), but you need it in "long format" (lots of rows)

Solution: Use melt()! ⛄➡️💧

See example 👇

Long format is better for analysis, transformation, merges...

#Python #DataScience #pandastricks

🐼🤹‍♂️ pandas trick #93: Want to combine the small categories in a Series (<10% frequency) into a single category? 1. Save the normalized value counts 2. Filter by frequency & save the index 3. Replace small categories with "Other" See example 👇 #Python #pandas #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #93:

Want to combine the small categories in a Series (&amp;lt;10% frequency) into a single category?

1. Save the normalized value counts
2. Filter by frequency &amp;amp; save the index
3. Replace small categories with &quot;Other&quot;

See example 👇

#Python #pandas #pandastricks

~Something new~ Tried "Pandas Profiling" following @justmarkham's #pandastricks in a Jupyter notebook provisioned on @IBMWatson studio and here's the output...

VidyasagarMSC's tweet image. ~Something new~ 
Tried &quot;Pandas Profiling&quot; following @justmarkham&apos;s #pandastricks in a Jupyter notebook provisioned on @IBMWatson studio and here&apos;s the output...

🐼🤹‍♂️ pandas trick #97: Want to convert "year" and "day of year" into a single datetime column? 📆 1. Combine them into one number 2. Convert to datetime and specify its format See example 👇 List of all format codes: strftime.org #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #97:

Want to convert &quot;year&quot; and &quot;day of year&quot; into a single datetime column? 📆

1. Combine them into one number
2. Convert to datetime and specify its format

See example 👇

List of all format codes: strftime.org

#Python #DataScience #pandastricks

Google Sheet "CSV" into A Pandas Dataframe. Thank me later #Pandas #PandasTricks #Python #GoogleSheets #100daysofcode

MphoMphego's tweet image. Google Sheet &quot;CSV&quot; into A Pandas Dataframe.

Thank me later

#Pandas #PandasTricks #Python #GoogleSheets #100daysofcode

🐍 Python Tip of the Day: Dealing with categorical data in Pandas? Use `pd.get_dummies()` to effortlessly convert them into indicator variables (one-hot encoding). This simplifies your data analysis! 🐱📈 #Pandas #GetDummies #PandasTricks #CategoricalData #InfiniteLoop

kamon's tweet image. 🐍 Python Tip of the Day: Dealing with categorical data in Pandas? Use `pd.get_dummies()` to effortlessly convert them into indicator variables (one-hot encoding). This simplifies your data analysis! 🐱📈

#Pandas #GetDummies #PandasTricks #CategoricalData #InfiniteLoop

Step 4: Outliers skewing your data? Visualize with boxplots or histograms, then tame them with winsorizing or scaling. Visualize, understand, act! #DataVisualization #PandasTricks [gpt-4]

DiscoverWithAI's tweet image. Step 4: Outliers skewing your data? Visualize with boxplots or histograms, then tame them with winsorizing or scaling. Visualize, understand, act! #DataVisualization #PandasTricks [gpt-4]

🙏🏻 #python #pandas community for finally introducing 💥 in version 25 #pandastricks

noeL_maS's tweet image. 🙏🏻 #python #pandas community for finally introducing 💥 in version 25 #pandastricks

Combine multiple CSV's into a single one. Thank me later! #Pandas #Python #PandasTricks #100DaysOfCode

MphoMphego's tweet image. Combine multiple CSV&apos;s into a single one.

Thank me later!
#Pandas #Python #PandasTricks #100DaysOfCode

Save data from a website to CSV using BeautifulSoup. Thank me later #Pandas #PandasTricks #WebScraping #Python #Selenium #100DaysOfCode

MphoMphego's tweet image. Save data from a website to CSV using BeautifulSoup.

Thank me later
#Pandas #PandasTricks #WebScraping #Python #Selenium #100DaysOfCode

A simple way to group data over time, by weekly, monthly, yearly by setting the frequency and doing calculations. #datascience #python #pandastricks

tommyhpratama's tweet image. A simple way to group data over time, by weekly, monthly, yearly by setting the frequency and doing calculations.

#datascience #python #pandastricks

Functions remove weird characters and spaces from column names, while keeping everything lower case. #datascience #python #pandastricks

tommyhpratama's tweet image. Functions remove weird characters and spaces from column names, while keeping everything lower case.

#datascience #python #pandastricks

Nice article, I learned new Pandas tricks: "10 Simple Hacks to Speed up Your Data Analysis in Python". buff.ly/2XFnMrO #DataScience #MachineLearning #pandastricks #BigData #DataAnalytics

KirellBenzi's tweet image. Nice article, I learned new Pandas tricks: &quot;10 Simple Hacks to Speed up Your Data Analysis in Python&quot;.

buff.ly/2XFnMrO

#DataScience #MachineLearning #pandastricks #BigData #DataAnalytics

Pandas trick: A convenient way of exploring new data without doing an awful lot. It is called pandas_profiling. You can install it through conda or pip Thanks ⁦@justmarkham#Python #DataScience #pandastricks@kodart_⁩ 👍🏾


Handling missing data like a boss! 💪 Dealing with NaNs or null values can be a headache, but Pandas provides robust tools like dropna() and fillna() to manage missing data gracefully. 🤯🔍 #DataCleaning #PandasTricks


Handling missing data like a boss! 💪 Dealing with NaNs or null values can be a headache, but Pandas provides robust tools like dropna() and fillna() to manage missing data gracefully. 🤯🔍 #DataCleaning #PandasTricks


🐍 Python Tip of the Day: Dealing with categorical data in Pandas? Use `pd.get_dummies()` to effortlessly convert them into indicator variables (one-hot encoding). This simplifies your data analysis! 🐱📈 #Pandas #GetDummies #PandasTricks #CategoricalData #InfiniteLoop

kamon's tweet image. 🐍 Python Tip of the Day: Dealing with categorical data in Pandas? Use `pd.get_dummies()` to effortlessly convert them into indicator variables (one-hot encoding). This simplifies your data analysis! 🐱📈

#Pandas #GetDummies #PandasTricks #CategoricalData #InfiniteLoop

Save data from a website to CSV using BeautifulSoup. Thank me later #Pandas #PandasTricks #WebScraping #Python #Selenium #100DaysOfCode

MphoMphego's tweet image. Save data from a website to CSV using BeautifulSoup.

Thank me later
#Pandas #PandasTricks #WebScraping #Python #Selenium #100DaysOfCode

Google Sheet "CSV" into A Pandas Dataframe. Thank me later #Pandas #PandasTricks #Python #GoogleSheets #100daysofcode

MphoMphego's tweet image. Google Sheet &quot;CSV&quot; into A Pandas Dataframe.

Thank me later

#Pandas #PandasTricks #Python #GoogleSheets #100daysofcode

Combine multiple CSV's into a single one. Thank me later! #Pandas #Python #PandasTricks #100DaysOfCode

MphoMphego's tweet image. Combine multiple CSV&apos;s into a single one.

Thank me later!
#Pandas #Python #PandasTricks #100DaysOfCode

No results for "#pandastricks"

🐼🤹‍♂️ pandas trick #100! 🎉 Want to read a HUGE dataset into pandas but don't have enough memory? Randomly sample the dataset *during file reading* by passing a function to "skiprows" See example 👇 Thanks to @TedPetrou for this trick! 🙌 #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #100! 🎉

Want to read a HUGE dataset into pandas but don&apos;t have enough memory?

Randomly sample the dataset *during file reading* by passing a function to &quot;skiprows&quot;

See example 👇

Thanks to @TedPetrou for this trick! 🙌

#Python #DataScience #pandastricks

🐼🤹‍♂️ pandas trick #94: Want to save a *massive* amount of memory? Fix your data types: ➡️ 'int8' for small integers ➡️ 'category' for strings with few unique values ➡️ 'Sparse' if most values are 0 or NaN More info: pythonspeed.com/articles/panda… by @itamarst #Python #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #94:

Want to save a *massive* amount of memory? Fix your data types:

➡️ &apos;int8&apos; for small integers
➡️ &apos;category&apos; for strings with few unique values
➡️ &apos;Sparse&apos; if most values are 0 or NaN

More info: pythonspeed.com/articles/panda… by @itamarst

#Python #pandastricks

🐼🤹‍♂️ pandas trick #83: Problem: Your dataset has many columns and you want to ensure the correct data types Solution: 1. Create CSV of column names & dtypes 2. Read it into a DF 3. Convert it to dict 4. Use dict to specify dtypes of dataset 👇 Example 👇 #Python #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #83:

Problem: Your dataset has many columns and you want to ensure the correct data types

Solution:
1. Create CSV of column names &amp;amp; dtypes
2. Read it into a DF
3. Convert it to dict
4. Use dict to specify dtypes of dataset

👇 Example 👇

#Python #pandastricks

🐼🤹‍♂️ pandas trick #85: Three useful ways to convert one set of values to another: 1. map() using a dictionary 2. factorize() to encode each value as an integer 3. comparison statement to return boolean values See example 👇 #Python #DataScience #pandastricks @python_tip

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #85:

Three useful ways to convert one set of values to another:

1. map() using a dictionary
2. factorize() to encode each value as an integer
3. comparison statement to return boolean values

See example 👇

#Python #DataScience #pandastricks @python_tip

🐼🤹‍♂️ pandas trick #89: Need to split names of variable length into first_name & last_name? 1. Use str.split(n=1) to split only once (returns a Series of lists) 2. Chain str[0] and str[1] on the end to select the list elements See example 👇 #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #89:

Need to split names of variable length into first_name &amp;amp; last_name?

1. Use str.split(n=1) to split only once (returns a Series of lists)
2. Chain str[0] and str[1] on the end to select the list elements

See example 👇

#Python #DataScience #pandastricks

🐼🤹‍♂️ pandas trick #98: Problem: Your DataFrame is in "wide format" (lots of columns), but you need it in "long format" (lots of rows) Solution: Use melt()! ⛄➡️💧 See example 👇 Long format is better for analysis, transformation, merges... #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #98:

Problem: Your DataFrame is in &quot;wide format&quot; (lots of columns), but you need it in &quot;long format&quot; (lots of rows)

Solution: Use melt()! ⛄➡️💧

See example 👇

Long format is better for analysis, transformation, merges...

#Python #DataScience #pandastricks

🐼🤹‍♂️ pandas trick #88: Goal: Rearrange the columns in your DataFrame Options: 1. Specify all column names in desired order 2. Specify columns to move, followed by remaining columns 3. Specify column positions in desired order See example 👇 #Python #pandastricks @python_tip

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #88:

Goal: Rearrange the columns in your DataFrame

Options:
1. Specify all column names in desired order
2. Specify columns to move, followed by remaining columns
3. Specify column positions in desired order

See example 👇

#Python #pandastricks @python_tip

🐼🤹‍♂️ pandas trick #91: Need to create a time series dataset for testing? Use pd.util.testing.makeTimeDataFrame() Need more control over the columns & data? Generate data with np.random & overwrite index with makeDateIndex() See example 👇 #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #91:

Need to create a time series dataset for testing? Use pd.util.testing.makeTimeDataFrame()

Need more control over the columns &amp;amp; data? Generate data with np.random &amp;amp; overwrite index with makeDateIndex()

See example 👇

#Python #DataScience #pandastricks

🐼🤹‍♂️ pandas trick #93: Want to combine the small categories in a Series (<10% frequency) into a single category? 1. Save the normalized value counts 2. Filter by frequency & save the index 3. Replace small categories with "Other" See example 👇 #Python #pandas #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #93:

Want to combine the small categories in a Series (&amp;lt;10% frequency) into a single category?

1. Save the normalized value counts
2. Filter by frequency &amp;amp; save the index
3. Replace small categories with &quot;Other&quot;

See example 👇

#Python #pandas #pandastricks

🐼🤹‍♂️ pandas trick #84: My favorite feature in pandas 0.25: If DataFrame has more than 60 rows, only show 10 rows (saves your screen space!) You can modify this: pd.set_option('min_rows', 4) See example 👇 More info: pandas.pydata.org/pandas-docs/st… #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #84:

My favorite feature in pandas 0.25: If DataFrame has more than 60 rows, only show 10 rows (saves your screen space!)

You can modify this: pd.set_option(&apos;min_rows&apos;, 4)

See example 👇

More info: pandas.pydata.org/pandas-docs/st…

#Python #DataScience #pandastricks

🐍 Python Tip of the Day: Dealing with categorical data in Pandas? Use `pd.get_dummies()` to effortlessly convert them into indicator variables (one-hot encoding). This simplifies your data analysis! 🐱📈 #Pandas #GetDummies #PandasTricks #CategoricalData #InfiniteLoop

kamon's tweet image. 🐍 Python Tip of the Day: Dealing with categorical data in Pandas? Use `pd.get_dummies()` to effortlessly convert them into indicator variables (one-hot encoding). This simplifies your data analysis! 🐱📈

#Pandas #GetDummies #PandasTricks #CategoricalData #InfiniteLoop

~Something new~ Tried "Pandas Profiling" following @justmarkham's #pandastricks in a Jupyter notebook provisioned on @IBMWatson studio and here's the output...

VidyasagarMSC's tweet image. ~Something new~ 
Tried &quot;Pandas Profiling&quot; following @justmarkham&apos;s #pandastricks in a Jupyter notebook provisioned on @IBMWatson studio and here&apos;s the output...

Step 4: Outliers skewing your data? Visualize with boxplots or histograms, then tame them with winsorizing or scaling. Visualize, understand, act! #DataVisualization #PandasTricks [gpt-4]

DiscoverWithAI's tweet image. Step 4: Outliers skewing your data? Visualize with boxplots or histograms, then tame them with winsorizing or scaling. Visualize, understand, act! #DataVisualization #PandasTricks [gpt-4]

Google Sheet "CSV" into A Pandas Dataframe. Thank me later #Pandas #PandasTricks #Python #GoogleSheets #100daysofcode

MphoMphego's tweet image. Google Sheet &quot;CSV&quot; into A Pandas Dataframe.

Thank me later

#Pandas #PandasTricks #Python #GoogleSheets #100daysofcode

🙏🏻 #python #pandas community for finally introducing 💥 in version 25 #pandastricks

noeL_maS's tweet image. 🙏🏻 #python #pandas community for finally introducing 💥 in version 25 #pandastricks

🐼🤹‍♂️ pandas trick #97: Want to convert "year" and "day of year" into a single datetime column? 📆 1. Combine them into one number 2. Convert to datetime and specify its format See example 👇 List of all format codes: strftime.org #Python #DataScience #pandastricks

justmarkham's tweet image. 🐼🤹‍♂️ pandas trick #97:

Want to convert &quot;year&quot; and &quot;day of year&quot; into a single datetime column? 📆

1. Combine them into one number
2. Convert to datetime and specify its format

See example 👇

List of all format codes: strftime.org

#Python #DataScience #pandastricks

Combine multiple CSV's into a single one. Thank me later! #Pandas #Python #PandasTricks #100DaysOfCode

MphoMphego's tweet image. Combine multiple CSV&apos;s into a single one.

Thank me later!
#Pandas #Python #PandasTricks #100DaysOfCode

Save data from a website to CSV using BeautifulSoup. Thank me later #Pandas #PandasTricks #WebScraping #Python #Selenium #100DaysOfCode

MphoMphego's tweet image. Save data from a website to CSV using BeautifulSoup.

Thank me later
#Pandas #PandasTricks #WebScraping #Python #Selenium #100DaysOfCode

A simple way to group data over time, by weekly, monthly, yearly by setting the frequency and doing calculations. #datascience #python #pandastricks

tommyhpratama's tweet image. A simple way to group data over time, by weekly, monthly, yearly by setting the frequency and doing calculations.

#datascience #python #pandastricks

Loading...

Something went wrong.


Something went wrong.


United States Trends