Python Forum
Parsing "aTimeLogger" Android app data to graphs using pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parsing "aTimeLogger" Android app data to graphs using pandas
#2
Toq uote myself from earlier:

(May-12-2024, 09:15 AM)Drone4four Wrote:
# Create a DataFrame
python = bulk_df[bulk_df["Activity"] == "Python"] #.rolling(window=90).mean()

# Plotting
python.plot(x='From', y='Duration', kind='line', marker='o',figsize=(14, 8))

At line 2, when I invoke pandas' dt module to parse quarter years with this:

python = bulk_df[bulk_df["Activity"] == "Python"].dt.quarter
I get this traceback:

Error:
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) /tmp/ipykernel_3152351/2962891946.py in ?() 1 # Create a DataFrame 2 # python = bulk_df[bulk_df["Activity"] == "Python"] #.rolling(window=90).mean() ----> 3 python = bulk_df[bulk_df["Activity"] == "Python"].dt.quarter 4 5 # Plotting 6 python.plot(x='From', y='Duration', kind='line', marker='o',figsize=(14, 8)) /usr/lib/python3.11/site-packages/pandas/core/generic.py in ?(self, name) 5898 and name not in self._accessors 5899 and self._info_axis._can_hold_identifiers_and_holds_name(name) 5900 ): 5901 return self[name] -> 5902 return object.__getattribute__(self, name) AttributeError: 'DataFrame' object has no attribute 'dt'
Reply


Messages In This Thread
RE: Parsing "aTimeLogger" Android app data to graphs using pandas - by Drone4four - May-12-2024, 07:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Parsing and summing time deltas (duration) onto bar + pie charts using pandas - - DRY Drone4four 2 819 Feb-10-2024, 06:04 PM
Last Post: Drone4four
  Grouping in pandas/multi-index data frame Aleqsie 3 936 Jan-06-2024, 03:55 PM
Last Post: deanhystad
Smile How to further boost the data read write speed using pandas tjk9501 1 1,373 Nov-14-2022, 01:46 PM
Last Post: jefsummers
  How to plot 2 graphs in one figure? man0s 1 1,531 Apr-25-2022, 09:18 AM
Last Post: Axel_Erfurt
Thumbs Up can't access data from URL in pandas/jupyter notebook aaanoushka 1 1,994 Feb-13-2022, 01:19 PM
Last Post: jefsummers
Question Sorting data with pandas TheZaind 4 2,551 Nov-22-2021, 07:33 PM
Last Post: aserian
  Pandas Data frame column condition check based on length of the value aditi06 1 2,842 Jul-28-2021, 11:08 AM
Last Post: jefsummers
  [Pandas] Write data to Excel with dot decimals manonB 1 6,185 May-05-2021, 05:28 PM
Last Post: ibreeden
  pandas.to_datetime: Combine data from 2 columns ju21878436312 1 2,564 Feb-20-2021, 08:25 PM
Last Post: perfringo
  pandas read_csv can't handle missing data mrdominikku 0 2,667 Jul-09-2020, 12:26 PM
Last Post: mrdominikku

Forum Jump:

User Panel Messages

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