Explore

pandas ×
  • screenshot

    How to replace a column value with a value from dictionary based on another column value

    I have the following Data Frame: ID Unique_value red_1 0 red_2 1 blue_1 1 blue_2 2...

  • screenshot

    move rows in df by the value of the cells with pandas

    I have the following input table and i want to obtain the output table. To do...

  • screenshot

    Querying GBQ table to.dataframe() function took too long to respond

    I am loading the table from google bigquery in python, the code as follow def read_bq(project_id,...

  • screenshot

    Axis Length mismatch when verifying Multi Index Dataframe using Pandera

    I am messing around with Pandera a bit and have a dataset with multi index columns....

  • screenshot

    Group dataframe by some columns, do nothing, display result

    I have a Pandas dataframe and need to group its values by some columns, then do...

  • screenshot

    pandas.to_parquet pyarrow.lib.ArrowInvalid: Could not convert Timedelta

    I have a huge multiindex dataframe in long format. There's only one "value" column. Some entries...

  • screenshot

    ModuleNotFoundError: No module named 'pandas' ( on Mac OS )

    I get this error when importing pandas in jupyter notebook. But I've install Pandas with the...

  • screenshot

    Python: Effective Techniques for Managing Dates in DataFrame

    In data analysis and time series processing, working with date columns is essential for extracting meaningful...

  • screenshot

    How to Convert Rows to Columns and Columns to Rows in Pandas DataFrame using Python

    In Python, you can use the pandas library to work with tabular data. The core data...

  • screenshot

    How to Use the Concat Function in Pandas for Horizontal or Vertical Table Concatenation

    In data analysis and manipulation, it is common to combine or concatenate multiple tables to create...

  • screenshot

    How to initialise a polars dataframe with column names from database cursor description?

    I'm connecting to Postgres Database using psycopg2 connector and using cursor property, i'm fetching the records...

  • screenshot

    How to identify the duplicates and move its data to other cells?

    I have initial dataset as an excel file: Name Number1 Number2 0 Anna 655 869 1...

  • screenshot

    How can i list excel files within a folder with different possible extentions (.xlsx, .xlsb, .xlsm) using python

    I want my code to display all the excel files in my folder which may have...

  • screenshot

    How to Perform Fuzzy Matching and Merge on Two DataFrames Based on Geographical Regions in Pandas

    I'm currently working on a project where I need to merge two pandas DataFrames based on...

  • screenshot

    Getting no result for two different startday and endday with starttime and endtime from the csv file? I am using python3

    Below is my python code to extract data from csv file # Specify the start and...

  • screenshot

    How to Lookup multiple Row and Column using PD

    I'm new to Python and would greatly appreciate if anyone can help please? I have the...

  • screenshot

    unable to sum up using seaborn

    I have a set of data which have different category under the same type. I want...

  • screenshot

    Convert Python dictionary of dictionary of dictionary to table

    I am working on python panda. I have dictionary of dictionary of dictionary as below. Could...

  • screenshot

    Among the repeated characters in the line, leave only one in pandas dataframe

    I have dataframe with column 'code': How can I drop repeated character '|' and leave only...

  • screenshot

    Convert GroupedData in Spark to a list of pandas dataframes in pyspark

    how can I transform a GroupedData object, that comes as a result of a groupBy on...

  • screenshot

    Use pipe method for multiple operations

    I have below code import pandas as pd dat1 = pd.DataFrame({'col1' : ['A', 'B', 'A', 'C'],...