Jump to content
  • To Search the Seeq Knowledgebase:

    button_seeq-knowledgebase.png.ec0acc75c6f5b14c9e2e09a6e4fc8d12.png.4643472239090d47c54cbcd358bd485f.png

Search the Community

Showing results for tags 'spy.push'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • Tips & Tricks
    • General Seeq Discussions
    • Seeq Data Lab
    • Seeq Developer Club
    • Seeq Admin Forum
    • Feature Requests

Calendars

  • Community Calendar

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Categories

  • Published
  • Code
  • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Company


Title


Level of Seeq User

Found 4 results

  1. Hi, I'm having issues pulling raw samples without the default grid. First I create a calculation one one truck. I search for one truck, and do a calculation push() truck1034_signals = spy.search({ "Path": "path >> to >> truck >> G52_TRC1034" }) Payload_resamp_calc = spy.push(metadata=pd.DataFrame([{ 'Type': 'Signal', 'Name': 'Payload Resamp', 'Formula': "$p.resample($c.toNumber()).remove($l2.isNotEqualTo('KR_KID2'))", 'Formula Parameters': { '$c': truck1034_signals[truck1034_signals['Name'] == 'CycleID'], '$p': truck1034_signals[truck1034_signals['Name'] == 'Payload'], '$l2': truck1034_signals[truck1034_signals['Name'] == 'LoadDestination'], } }]), workbook='SPy Documentation Examples >> spy.pull') Then i search for more trucks, in this case just 6 trucks for testing. (In reality its like 60 trucks i want to get.) #this finds 6 trucks truck_assets = spy.search({ "Name": "G52_TRC103", "Path": "path >> to >> truck >> Hauling" }) start=pd.Timestamp("2023-11-17 01:45", tz='CET') end=pd.Timestamp("2023-11-17 03:15", tz='CET') df = spy.pull(truck_assets,start=start, end=end, calculation=Payload_resamp_calc,header='Name') df.head() Running this with default grid works and gives this result: However, i want raw samples, not default grid of 15 min. When I ad the grid=None option to the pull i get this error: df = spy.pull(truck_assets,start=start, end=end, calculation=Payload_resamp_calc,header='Name',grid=None) SPy Error: Pull cannot include conditions when no signals are present with shape='samples' and grid=None Why is it not working without the grid? I tried even for just one truck and still it does not work with the grid=None. Is it due to the calculation in some way?
  2. Hi, (updated since first post) I'm trying to push() 2 external signals and metadata for UoM for them in a single push(). SO far i can make it work with 2 separate pushes, one for the data and one for the metadata like in the code below: #create df's data_for_seeq_FCRD_Up = pd.DataFrame({'FCR-D Up Price': prices_upp}, index=pd.to_datetime(dates_upp)) data_for_seeq_FCRD_Down = pd.DataFrame({'FCR-D Down Price': prices_ned}, index=pd.to_datetime(dates_ned)) # Combine the data for both signals into a single DataFrame data_for_seeq_combined = pd.concat([data_for_seeq_FCRD_Up, data_for_seeq_FCRD_Down], axis=1) push_result = spy.push(data=data_for_seeq_combined, workbook='Aitik >> FCR Aitik Monitor', worksheet='FCR Prices') # Assuming 'push_result' now contains two rows, one for each signal # Update the 'Name' and 'Value Unit Of Measure' for both signals push_result.loc[push_result['Name'] == 'FCR-D Up Price', 'Value Unit Of Measure'] = 'EUR/MW' push_result.loc[push_result['Name'] == 'FCR-D Down Price', 'Value Unit Of Measure'] = 'EUR/MW' # Push the combined metadata back to Seeq push_results_meta_combined = spy.push(metadata=push_result, workbook='Aitik >> FCR Aitik Monitor', worksheet='FCR Prices') # Print the combined push results print(push_results_meta_combined) When i try to structure the metadata and send in in the same push() as the data it looks like this: data_for_seeq_FCRD_Up = pd.DataFrame({'FCR-D Up Price': prices_upp}, index=pd.to_datetime(dates_upp)) data_for_seeq_FCRD_Down = pd.DataFrame({'FCR-D Down Price': prices_ned}, index=pd.to_datetime(dates_ned)) # Combine the data for both signals into a single DataFrame data_for_seeq_combined = pd.concat([data_for_seeq_FCRD_Up, data_for_seeq_FCRD_Down], axis=1) # Create a single metadata DataFrame for both signals metadata_combined = pd.DataFrame({ 'Name': ['FCR-D Up Price', 'FCR-D Down Price'], # Signal names 'Value Unit Of Measure': ['EUR/MW', 'EUR/MW'] # Units of measure for both signals # Add other required fields for metadata as per your requirements }) metadata_combined.index = metadata_combined['Name'] print(data_for_seeq_combined.head()) print(metadata_combined.head()) push_results_combined = spy.push(data=data_for_seeq_combined, metadata=metadata_combined, workbook='Aitik >> FCR Aitik Monitor', worksheet='FCR Prices',datasource='Mimer SVK API') The format of the data and metadata dataframes looks like: FCR-D Up Price FCR-D Down Price 2023-11-16 00:00:00+01:00 23.066646 9.116699 2023-11-16 01:00:00+01:00 22.670452 9.076252 2023-11-16 02:00:00+01:00 21.816880 8.906874 2023-11-16 03:00:00+01:00 21.654117 8.916882 2023-11-16 04:00:00+01:00 26.594917 8.885253 Name Value Unit Of Measure Name FCR-D Up Price FCR-D Up Price EUR/MW FCR-D Down Price FCR-D Down Price EUR/MW The error I keep getting is: SPy Error: Items with no valid type specified cannot be pushed unless they are calculations. "Formula" column is required for such items. So when I send then in separate pushes it works, but sending data and metadata together then the type is not valid for the signals? What is happening here?
  3. A small team of us (with help from Seeq team members) built a short script to extract signal names from our legacy excel workbooks so that we could push them to Seeq workbench. Perhaps, like us, you are involved in migrating workbooks for monitoring/ reporting over to Seeq and could do with a boost to get started so you can get to real work of setting up the Seeq workbench. The attached script will extract the signal names (assuming you can craft your own regex search filter) from each excel worksheet and then push them to workbench with labeling for organization. Hopefully its a help to some 🙂 signal_transfer_excel2seeq_rev1.ipynb
  4. When I use the spy.push() command to insert some capsules into a worksheet it overwrites the existing worksheet rather than just inserting into it. The capsules are made correctly but all other data in the worksheet disappears. I've read through the docs and can't see anywhere where I need to specify to insert and not overwrite. Hoping someone could point me in the right direction. spy.push(data=CapsuleData, metadata=pd.DataFrame([{ 'Name': 'Capsules Times', 'Type': 'Condition', 'Maximum Duration': '1d' }]), workbook='Practice', worksheet='Practice Worksheet')
×
×
  • Create New...