All Questions
8,915
questions
0
votes
0
answers
20
views
Pandas check if a column has NaT type, unable to find date diff with NaT values [duplicate]
I have StartDate and ExitDate two columns in my dataframe with NaT values in ExitDate column
I wish to create a third column Tenure by finding Difference between ExitDate and StartDate.
StartDate ...
2
votes
1
answer
41
views
how do you sort column names in Date in descending order in pandas
I have this DataFrame:
Node Interface Speed Band_In carrier Date
Server1 wan1 100 80 ATT 2024-05-09
Server1 wan1 100 50 ...
0
votes
0
answers
43
views
pd.Timestamp() behavior in Pandas
Trying to understand why t1 takes current date whereas t2 takes the epoch date in Pandas in Python. Any thoughts would help.
import pandas as pd
t1 = pd.Timestamp("23:12:05")
print("t1:...
0
votes
2
answers
84
views
add date columns
I have two columns with date and I need to create another based on sum of those two. df looks like below:
date_1 date_2 result_date
2024-07-07 18:00:00....
1
vote
0
answers
26
views
pd.to_datetime() not working for old dates [duplicate]
When trying to convert the "Date" field of a pandas DataFrame using pd.to_datetime(), I get an "OutOfBoundsDatetime" error only when the date is before Year 1700 (otherwise the ...
0
votes
1
answer
54
views
Filter datetime column with object as data type in python
I have a df with a Timestamp and Value columns. Both have the 'object' dtype
| Timestamp | Value |
--------------------------------------
| 8/21/2023 12:00:00 AM | a |
| 11/...
0
votes
0
answers
27
views
How can you use axvspan to show missing datetime data?
I am plotting data showing the water surface elevation of a creek over a 16-year time span. The data are provided in 15-minute increments, but there are missing time periods, including one that lasted ...
0
votes
1
answer
53
views
What is the meaning of: Pandas data cast to numpy dtype of object. Check input data with np.asarray(data) and how can be solved?
I'm trying to model a time series for a stock price with the following code:
import opendatasets as od
import numpy as np
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots ...
1
vote
2
answers
52
views
Pandas: Supporting a time past 24:00:00 [duplicate]
I'm trying to manipulate a dataset that contains stop times of trains in stations. This data only contains the times and not the dates. In this dataset, there can be times that are past 24:00:00. For ...
-8
votes
0
answers
120
views
Pandas plotting multiple dataframes - first df deprecates datetime x-axis to show only %H:%M and not %m/%d %H:%M:%S [closed]
I am trying to input a single .csv file that contains data from different packet streams (hence, different time values). I created a dataframe for each time and the data points/columns from each ...
1
vote
1
answer
52
views
How Would One Go About Creating A Graph Like This In Plotly/Pandas?
I would like to recreate following image in Plotly and Pandas. but I'm not sure how.
I have looked into using Gantt Graphs but every time I see one the timeline is going along the x axis and not the ...
0
votes
1
answer
56
views
Getting Datetime format column to export into excel without H:M:S
I am comparing two excel sheets for employees. Its the same data, just one week apart. It then highlights the changes of pay columns, if any exist. The code functions but the excel sheet that it ...
1
vote
1
answer
32
views
New column calculation error based on datetime and timedelta column based on two dataframes
I have a python dataframe df_A which index column contains integer data and represent a time stamp in seconds time row (it might be not have a strictly monotonic gradient).
And I have another ...
0
votes
0
answers
25
views
Pandas: In data frame column how to change date time format from '2022-10-11 15:15:00+05:30' to '11-10-2022 15:15'(DD-MM-YYYY HH:MI) [duplicate]
I have a CSV file containing column called datetime with values like 2022-10-11 15:15:00+05:30 in 15 minutes interval.
File has 40k rows and I want to remove +05:30 from all datetime column values.
I ...
0
votes
0
answers
19
views
compute new datetime dataframe column [duplicate]
I want to create a new datetime column in a python dataframe.
First data point is a given time stamp with the format
print(sinfo.BeginTime)
2021-07-08T08:56:46.637
Name: BeginTime, dtype: object
All ...