Circular reference error
See original GitHub issueWhen trying to log pandas dataframe constructed via function, an error occurs.
Using .copy(deep=True)
doesn’t help.
Example code:
from sklego.model_selection import TimeGapSplit
from datetime import timedelta
cv = TimeGapSplit(
date_serie=df.reset_index("time").loc[:, "time"],
train_duration=timedelta(days=7),
valid_duration=timedelta(days=1),
gap_duration=timedelta(days=0),
n_splits=3,
)
table_plot = cv.summary(df)
title = "cross-validation folds"
series = "1"
Logger.current_logger().report_table(title=title, series=series, table_plot=table_plot)
Actual result:
ValueError: Circular reference detected
UPD: This did not help:
df_ = cv.summary(df_dev)
_df = pd.DataFrame(data=df_.values, index=df_.index, columns=df_.columns)
table_plot = _df
title = "cross-validation folds"
series = "1"
Logger.current_logger().report_table(title=title, series=series, table_plot=table_plot)
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Remove or allow a circular reference - Microsoft Support
If you can't find the error, click the Formulas tab, click the arrow next to Error Checking, point to Circular References, and then...
Read more >How to fix a circular reference error - Excel formula - Exceljet
"There are one or more circular references where a formula refers to its own cell either directly or indirectly. This might cause them...
Read more >How to Fix the Excel Circular Reference Error? - Simon Sez IT
A circular reference, as the name suggests happens when any formula directly or indirectly refers back to its own results. This creates an...
Read more >How to Find and Fix Circular References in Excel
In simple terms, a circular reference happens when a formula references back to its own cell directly or indirectly, creating an endless loop...
Read more >How To Find and Remove Circular References in Excel - Indeed
The error message appears in a dialog box in the middle of your screen. It offers a simple definition of a circular reference,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jkhenning tested on 1.1.5rc4, works, nice job!
Wouldn’t call it too readable, but that’s on
pandas
/plotly
team. At least it doesn’t break now so doesn’t make you write ad hoc boilerplate for type conversion.@ColdTeapot273K we might have found a way to support it by using
to_json()
and letting pandas handle it 🙂 - I’ll update when an RC with this fix is available