What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-03 03:29:01
Returns the cartesian product with another DataFrame
# Returns the cartesian product with another DataFrame df.select("age", "name").collect() # [Row(age=2, name='Alice'), Row(age=5, name='Bob')] df2.select("name", "height").collect() # [Row(name='Tom', height=80), R... Add solution -
Python 2021-09-03 00:35:02
how to find and replace all the punctuation in python strings
#import the regex library (pip install it with -> "pip install regex" import re test_phrase = 'This is a string! Bust it has punctuation. How can we remove it?' #We're going to replace the punctution with a whitespace clean = ' '.join(re.fi... Add solution -
Other 2021-09-01 07:50:01
display sequence of days
function weekendDaysToString($days, $lang = 'en') { $and = array('pt'=>'e', 'en'=>'and'); $strWeek = array( // config with more langs! 'pt'=>array("Segunda", "Terça", "Quarta", "Quinta... Add solution -
Javascript 2021-09-01 04:21:03
anagram js
function isAnagram(stringA, stringB) { // Sanitizing stringA = stringA.toLowerCase().replace(/[\W_]+/g, ""); stringB = stringB.toLowerCase().replace(/[\W_]+/g, ""); // sorting const stringASorted = stringA.split(""... Add solution
Best helpers
Ranking is empty