Skip to content

Commit

Permalink
remove pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
KaraMelih committed Jan 16, 2024
1 parent 5f33f64 commit 3e5090f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions snews_pt/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import click
import json
import numpy as np
import pandas as pd
from abc import ABC, abstractmethod

from datetime import datetime
Expand Down Expand Up @@ -92,7 +91,7 @@ def clean_time_input(input_datetime):
Parameters
----------
input_datetime : np.datetime64, datetime.datetime, pd.Timestamp or str
input_datetime : np.datetime64, datetime.datetime or str
Returns
-------
Expand All @@ -101,7 +100,7 @@ def clean_time_input(input_datetime):
if input_datetime is None:
return np.datetime_as_string(np.datetime64(datetime.utcnow().isoformat()), unit='ns')

if isinstance(input_datetime, (str, np.datetime64, pd.Timestamp, datetime)):
if isinstance(input_datetime, (str, np.datetime64, datetime)):
# If the input is already a string or NumPy datetime64, return it as is
dt = np.datetime64(input_datetime)
return np.datetime_as_string(dt, unit='ns')
Expand Down

0 comments on commit 3e5090f

Please sign in to comment.