Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

pandas

Create Pandas DataFrame from a string

August 20, 2022 by Magenaut

In order to test some functionality I would like to create a DataFrame from a string. Let’s say my test data looks like:

Categories Python, Q&A Tags csv, csv-import, pandas, python, string Leave a comment

Pandas Dataframe line plot display date on xaxis

August 20, 2022 by Magenaut

Compare the following code:

Categories Python, Q&A Tags datetime, matplotlib, pandas, python Leave a comment

Python pandas insert list into a cell

August 20, 2022 by Magenaut

I have a list ‘abc’ and a dataframe ‘df’:

Categories Python, Q&A Tags dataframe, insert, list, pandas, python Leave a comment

Remove duplicates by columns A, keeping the row with the highest value in column B

August 20, 2022 by Magenaut

I have a dataframe with repeat values in column A. I want to drop duplicates, keeping the row with the highest value in column B.

Categories Python, Q&A Tags duplicates, pandas, python Leave a comment

Convert Excel style date with pandas

August 20, 2022 by Magenaut

I have to parse an xml file which gives me datetimes in Excel style; for example: 42580.3333333333.

Categories Python, Q&A Tags date, datetime, excel, pandas, python Leave a comment

Convert number strings with commas in pandas DataFrame to float

August 20, 2022 by Magenaut

I have a DataFrame that contains numbers as strings with commas for the thousands marker. I need to convert them to floats.

Categories Python, Q&A Tags pandas, python Leave a comment

Get rows based on distinct values from one column

August 20, 2022 by Magenaut

How can I get the rows by distinct values in COL2?

Categories Python, Q&A Tags pandas, python Leave a comment

Pandas: Drop consecutive duplicates

August 20, 2022 by Magenaut

What’s the most efficient way to drop only consecutive duplicates in pandas?

Categories Python, Q&A Tags pandas, python Leave a comment

pandas: How do I split text in a column into multiple rows?

August 20, 2022 by Magenaut

I’m working with a large csv file and the next to last column has a string of text that I want to split by a specific delimiter. I was wondering if there is a simple way to do this using pandas or python?

Categories Python, Q&A Tags dataframe, pandas, python Leave a comment

Efficient way to unnest (explode) multiple list columns in a pandas DataFrame

August 20, 2022 by Magenaut

I am reading multiple JSON objects into one DataFrame. The problem is that some of the columns are lists. Also, the data is very big and because of that I cannot use the available solutions on the internet. They are very slow and memory-inefficient

Categories Python, Q&A Tags dataframe, json, pandas, pandas-explode, python Leave a comment
Older posts
Newer posts
← Previous Page1 … Page21 Page22 Page23 … Page92 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress