Skip to main content
1 vote
0 answers
41 views

I am trying to run a for loop that will extract variables from two different datasets into one data frame. One dataset contains information on estuaries of the West Coast of North America, the other ...
Chloe Emes's user avatar
0 votes
1 answer
53 views

I am having a problem to put an entire row from data in a list import pandas as pd import numpy as np import csv df= pd.read_csv ("data.csv") my_list = [] # list for n in range(1, ...
Kan's user avatar
  • 41
2 votes
3 answers
102 views

I have a dataFrame with columns Age, Salary and others, if I used: df['Age'] = df['Age'].apply(lambda x : x+100 if x>30 else 0) Then I can modify the Age column with the if else condition. Also, if ...
Edy's user avatar
  • 33
0 votes
1 answer
99 views

I am new to R and trying to create two new variables from my dataset. My data frame is called netflix and it contains these relevant columns: date_added and duration Example values: date_added: "...
user31963479's user avatar
1 vote
0 answers
47 views

I am trying to explain() a Polars query to see which operations can be executed using the streaming engine. Currently, I am only able to do this using show_graph(). From sources on the web, I see that ...
gaut's user avatar
  • 6,038
Advice
1 vote
2 replies
81 views

Is there a simple way (i.e., not involoving writing a print() method) to show the timezone when printing a data frame with a POSIXct column ? as.data.frame(Sys.time()) # Sys.time() # 1 2025-...
Thomas's user avatar
  • 553
-1 votes
1 answer
92 views

I noticed that groupby().apply() produces different results for two groups that look identical, except that the overall DataFrame has duplicate index values. Here is a minimal reproducible example: ...
Bhumika Aggarwal's user avatar
1 vote
1 answer
66 views

I have string column in polars dataframe with multiple datetime formats and I am using following code to convert datatype of column from string into datetime. import polars as pl df = pl.from_dict({'...
dikesh's user avatar
  • 3,135
0 votes
0 answers
72 views

I have a Python file import polars as pl import requests from pathlib import Path url = "https://raw.githubusercontent.com/leanhdung1994/files/main/processedStep1_enwiktionary_namespace_0_43....
Akira's user avatar
  • 2,820
0 votes
1 answer
153 views

I have a number of data.frames, with names apple, banana, and coffee. I want to create, and then export, new dataframes in a for-loop corresponding to each one, call them apple_new, banana_new, and ...
s84492025's user avatar
2 votes
4 answers
154 views

I got a dataframe df1 which looks like this: Column1 Column2 13 1 12 1 15 0 16 0 15 1 14 1 12 1 11 0 21 1 45 1 44 0 The 1s indicate that a measurement started, I don't know how many 1s will be in one ...
toben aus's user avatar
1 vote
3 answers
168 views

I have a .ndjson files with millions of rows. Each row has a field html which contains html strings. I would like to write all such html into a .txt file. One html is into one line of the .txt file. I ...
Akira's user avatar
  • 2,820
5 votes
2 answers
109 views

Consider the following pandas Series with a DatatimeIndex of daily values (using day-of-year as an example): import pandas as pd dti = pd.date_range("2017-11-02", "2019-05-21", ...
Mike T's user avatar
  • 44.4k
2 votes
1 answer
133 views

I am looking for the nearest non exact match on the dates column: import polars as pl df = pl.from_repr(""" ┌─────┬────────────┐ │ uid ┆ dates │ │ --- ┆ --- │ │ i64 ┆ date ...
rainerpf's user avatar
Tooling
0 votes
2 replies
67 views

I would like to know how to export or import TOON (Token object oriented notation) in pandas.
Rainb's user avatar
  • 2,567

15 30 50 per page
1
2 3 4 5
9913