Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pytrendy/detect_trends.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
import warnings
import pandas as pd
import numpy as np
import warnings
from difflib import get_close_matches
from .process_signals import process_signals
from .post_processing.segments_get import get_segments
from .post_processing.segments_refine import refine_segments
from .post_processing.segments_analyse import analyse_segments
from .io.plot_pytrendy import plot_pytrendy
from .io.results_pytrendy import PyTrendyResults
from datetime import date

def detect_trends(df: pd.DataFrame,
value_col: str,
Expand Down Expand Up @@ -43,7 +40,7 @@ def detect_trends(df: pd.DataFrame,
value_col (str):
Name of the column containing the primary signal to analyse for trend detection.
date_col (str|None):
Historically, this represents the name of the column containing timestamps, but pytrendy now allows for indexes of any type to be used. In general, this column represents a human readable reference to the x-position of the sequence. Normally this would be a date or timestamp, but any unique set of values could be used. Default is 'None', in which case an integer sequence will be generated and used to idenify segmenets.
Historically, this represents the name of the column containing dates, but pytrendy now allows for indexes of any type to be used. In general, this column represents a human readable reference to the x-position of the sequence. Normally this would be a date or timestamp, but any unique set of values could be used. Default is 'None', in which case an integer sequence will be generated and used to identify segments.
plot (bool, optional):
If `True`, generates a matplotlib plot showing the detected trend segments over the original signal.
Defaults to `True`.
Expand Down
Binary file removed test.png
Binary file not shown.
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"""

import pandas as pd
import math

def assert_segments_match(detected_segments, expected_segments):
"""
Expand Down
1 change: 0 additions & 1 deletion tests/test_core_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import pytest
import pytrendy as pt
import pandas as pd
from conftest import assert_segments_match


Expand Down
Loading